C# Check value is number. Isnumeric function in C#
|
|
|
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(value,
out retNum
); }
|
Applies to |
|
C# 2.0
,.Net 2.0 Windows Forms, Asp.Net 2.0
|
Rank It |
|