To check if string is date in C# and VB.NET you can use the following snippet.
Sample C#
public bool IsDate(string input) { DateTime result; return DateTime.TryParse(input, out result); }
Sample VB.NET
Public Function IsDate(input As String) As Boolean Dim result As DateTime Return DateTime.TryParse(input, result) End Function
RT @CodeSnippetsNET: How to check if string is date in .NET http://t.co/lP12brm3vT #csharp #vb #dotnet #programming #code