C# compare date values

62

C# compare date values -

var target = DateTime.Parse("3/25/2020");
var todaysDate = DateTime.Today;

if(target > todaysDate)
{
    Console.WriteLine("Hello World!");
}
else 
{
    Console.WriteLine("Too Bad");
}

Comments

Submit
0 Comments