in c# 4.0、テキストボックスで日付を確認する方法、日付がより大きいか等しい
DateTime StartDate = Convert.ToDateTime(TxtStrtDate.Text);
DateTime ExpirationDate = Convert.ToDateTime(TxtExpDte.Text);
ありがとう
どうですか
bool b = ExpirationDate >= StartDate;
このDateTime.GreaterThanOrEqual 演算子を読む
また
int i = DateTime.Compare(ExpirationDate, StartDate);
//if ExpirationDate is less than StartDate then result is Less than zero
//if ExpirationDate equals StartDate then result is Zero
//if ExpirationDate is greater than StartDate then result is Greater than zero
DateTime.Compare()
is the easiest way I can think of.