Parseint in vb.net?

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.
 
H

Henrik Stidsen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top