If you want to find out if the input string is a number in C# , you can use the try parse method.
How to find if the string is a number or not in C# ?
Below is a function in C# that demonstrates finding if the string is a number in C#.
public bool IsNumber(string Input)
{
int result;
bool isNumber = int.TryParse(Input, out result);
return isNumber;
}
Leave a Reply