Parseint in vb.net?

  • Thread starter Thread starter Garg
  • Start date Start date
G

Garg

Please tell me how do we use parseint function or its equivalent in
vb.net.
And also tell me how do we hide and display controls during run-time
in vb.net? I need to access the rows of a table for rendering them
during run-time.
 
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
 
Back
Top