how to check if string is int and return boolean
-
Hello how can i check that if my string is an integer or not ? if yes then return true else false; plz help regards, max
-
Hello how can i check that if my string is an integer or not ? if yes then return true else false; plz help regards, max
-
Hello how can i check that if my string is an integer or not ? if yes then return true else false; plz help regards, max
-
int result; bool isInt = int.TryParse("123", out result);
use Try and catch block with int.parse or convet.int32() method. if any error occur then false else true.
Rajesh soni
-
Hello how can i check that if my string is an integer or not ? if yes then return true else false; plz help regards, max
-
Another good way: If Not IsNumeric(strString) Then bool = False Else bool = True End If Nathan Lindley .NET Aficionado
hey guys, i got one more solution . its just like if(convert.toint(str) is int) { return true; } else return false; thanks for the replies.