Pages

Monday, November 16, 2009

IsNumeric function in C# equivalent to VB6 IsNumeric() By Praveen P R

// C# .NET
//Check Value if numeric
public static bool IsNumeric(object Expression)
{
bool isNum;
double retNum;
isNum = Double.TryParse(Convert.ToString(Expression), System.Globalization.NumberStyles.Any, System.Globalization.NumberFormatInfo.InvariantInfo, out retNum);
return isNum;
}
http://prpraveen.blogspot.com/

No comments: