C# Date Time common concepts
C# DateTime is a value type (struct) that represents a specific date and time. It's found in System namespace. This feature comes in handy whenever we need to work with date and time. We can create or instantiate a DateTime object as follows: DateTime date = new DateTime(2019, 03, 29, 15, 0, 0); In the above example year, month, day, hour, minutes and seconds have been provided as an argument. If we print date using Console.WriteLine() then it will show following output. Console.WriteLine(date) //-->/29/2019 3:00:00 PM We can also use the same principle to create a DateTime object representing the current date and time DateTime now = DateTime.Now; We can compare the two dates if (date > now) { Console.WriteLine(true); } else Console.WriteLine(false); Above example prints false as the date is smaller than the now. We can also format DateTime object as per our requirements. An example static method is shown below public static string Description(Dat...