To check if a string is a number in C# and VB.NET you can use the following snippet.
Sample C#
public static bool IsNumeric(String input) { double checkNumber; return double.TryParse(input, out checkNumber); }
Sample VB.NET
Public Shared Function IsNumeric(input As [String]) As Boolean Dim checkNumber As Double Return Double.TryParse(input, checkNumber) End Function
RT @CodeSnippetsNET: How to check if a string is a number in .NET http://t.co/VN0FtD3JD3 #csharp #dotnet #vb