Screencast-O-Matic is the free and easy way to record your screen.   Try our free Screen Recorder!

TryParse Methods

Created: Nov 14 2015

Description

Using Integer.TryParse( ) and Double.TryParse( ) to convert String data to a numeric data type. The shell program is available at http://bowerpower.net/compprog1/vb04/TryParseMethods.zip

Notes

1:13

Using Integer.TryParse( ) to convert String data to an integer. If the data can be converted, then TryParse assigns the converted data to the integer variable and returns TRUE (that's why it is handy to use with IF statements); if TryParse can't convert the data, nothing is assigned to the variable and it returns FALSE.

6:01

Using Double.TryParse( ) to convert String data to an double. If the data can be converted, then TryParse assigns the converted data to the double variable and returns TRUE (that's why it is handy to use with IF statements); if TryParse can't convert the data, nothing is assigned to the variable and it returns FALSE.

Advertisement