你可以使用DateTime.Compare这个:
var result = DateTime.Compare(Convert.ToDateTime(TextBox1.Text), DateTime.Today);
string relationship;
if (result < 0)
relationship = "is earlier than";
else if (result == 0)
relationship = "is the same time as";
else
relationship = "is later than";
Console.WriteLine("{0} {1} {2}", date1, relationship, date2);
Run Code Online (Sandbox Code Playgroud)
有关更多详细信息,请参阅MSDN上的文档.