Date Verfication

  • Thread starter Thread starter S
  • Start date Start date
S

S

Is there a good C# function to verify if a date is valid? Right now I am
casting a date that is in string form (Convert.ToDateTime(dateString)) and
catching an exception. This seems sort of lame.


???
 
Well, you could use DateTime.Parse(String); but you will still have to catch
an exception (FormatException).
 
Back
Top