On Feb 14, 7:49 am, "Garg" <shivaniga...@gmail.comwrote:
Please tell me how do we use parseint function or its equivalent in
vb.net.
There are two functions:
Integer.parse(stringWithNumber) which returns an integer but throws an
exception if the string is not a number.
The other one, which I recommend, is Integer.tryParse, use it like
this:
Dim outNumber as Integer
If not Integer.tryParse(stringWithNumber, outNumber) Then
outNumber = defaultValue
End If
----
If stringWithNumber is not parseable as an Integer outNumber is set to
0.