IsDate VB function equivalent

  • Thread starter Thread starter Mike
  • Start date Start date
Hi there,

There isn't an equivalend IsDate function in C#

You could use the DateTime.Parse() method. If it throws an exception, its
not a date.

Regards,
 
Try this

You have to add reference to Microsoft.VisualBasic in c# project.

string myDate = @"1\1\04";

bool Result = Microsoft.VisualBasic.Information.IsDate(myDate );

--
Shak
(Houston)



Hi,

Anyone knows what the equivalent of the IsDate function is in C#?

Thanks
Mike
 
Back
Top