G
Guest
What is prefered way to check whether a is a numeric value
Is ther something like IsNumeric function in VB6
Thanks
Mark.
Is ther something like IsNumeric function in VB6
Thanks
Mark.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
VJ said:The same IsNumeric is available in VB.NET, but the recomendation is to use
the RegEx functions..

can you point me to those test?(in the tests I did a while ago, at least).
can you point me to those test?
Tryparse actually throws an exception on an invalid format. I'm not sure
that a live exception is faster than a regex compilation and execution.
It would make sense that if the data was significantly faulty, or perhaps
generally unknown that the use of a regex would be a suitable optimization
to avoid the run-time exceptions.
mikeb said:I've seen you put forth and defend this algorithm several times. I
suggest you add this to your FAQ - maybe in the "Converting to C# from
VB.NET" section. It's not only a FAQ, but it's one that seems to get
you sucked into a lengthy explanation each time.

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.