Link to home
Start Free TrialLog in
Avatar of jagguy
jagguyFlag for Australia

asked on

isnumeric

is there an isnumeric function in silverlight?
I cant find it?
Avatar of Pratima
Pratima
Flag of India image

you can use int.TryParse() or float.TryParse() like

int dummy;
if (TryParse(someString, out dummy))
{
     // it is numeric
}

you can do the same with float or double, or any other numeric type.
Indeed TryParse will convert the string to a numeric value (dummy). If you just want to test if it is numeric, you have to use a dummy variable.
ASKER CERTIFIED SOLUTION
Avatar of Dmitry G
Dmitry G
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
double Dummy = new double();
shall be just:
double Dummy;
My apologies - you are right!