I am iterating through a text file using VB.net. Some of the numeric values are stored as strings. I would like to use the VB.net command Convert.ToSingle to convert the string input into a decimal(Or floating point number). How shall I handle the case when the string value is not numeric, because an exception will be thrown? I wish there was a command that could in effect look ahead to determine if the value is not numeric.
Dim num As Single
num - Convert.ToString(inString) ' Exception thrown here if the inString value is not numeric