Wednesday, January 18, 2006

IsNumeric in C#

VBForums - View Single Post - IsNumeric in C#: "a simple example of implementing the IsNumeric function in to C# i knocked up ...

visual basic code:
private bool IsNumeric(object ValueToCheck)
{
double Dummy = new double();
string InputValue = Convert.ToString(ValueToCheck);

bool Numeric = double.TryParse( InputValue , System.Globalization.NumberStyles.Any , null , out Dummy);

return Numeric;
}"
Post a Comment