Attention: We have retired the ASP.NET Community Blogs. Learn more >

Tip 8 : IsDate() function in C#

C# does not provide IsDate() function, but you can build one pretty easily:

image IsDate

You can build other functions such as IsInteger() by using int.Parse() instead of DateTime.Parse().

Based on feedbacks from the community, I am adding an alternative using TryParse.

image IsDate

11 Comments

Comments have been disabled for this content.