Determine if a String Evaluates to an Integer
Category:
String ManipulationType:
SnippetsDifficulty:
BeginningAuthor:
Ray D DescalzoVersion Compatibility: Visual Basic 6, Visual Basic 5
More information:
This code takes a string as a parameter and returns true if the string evaluates to an integer, false otherwise. It works for values such as "+10", "-10", and for octal and hex values as well. However, in line with the strict definition of the term integer (see http://webopedia.internet.com/TERM/i/integer.html), it will return false for values such as 9.0.
Instructions: Copy the declarations and code below and paste directly into your VB project.
Declarations: