IsDate VB function equivalent

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi,

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

Thanks
Mike
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top