,
Share with your friends 

C# Check value is number. Isnumeric function in C#

0 ratings Views 409 
Author: krish (krishna kumar)  View Profile |  View other solutions by this author

Question / Problem


C# Check value is number. Isnumeric function in C#

Solution

No Isnumeric function available in C# but we can create

Int , double all the datatypes having the method TryParse using that we can check the passed value is number or not

public static bool IsNumeric(string value)
{
      double retNum;
     
return Double.TryParse(valueout retNum );
}



Applies to

C# 2.0 ,.Net 2.0 Windows Forms, Asp.Net 2.0

Rank It

Login to rank it

Report


Advertisement