I want to gain a true or false answer if this variable is enable to be converted from string into a int value.
Is there a build-in syntax for it in C#?
I want to gain a true or false answer if this variable is enable to be converted from string into a int value.
Is there a build-in syntax for it in C#?
Use int.TryParse
string numberString = "123";
int number;
bool isConvertible = int.TryParse(numberString, out number);