473,385 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

.NET IsNumeric function

Joe
Hello All:

Does anyone know how someone would check for a numeric value in .NET? In
VB6, we used IsNumeric. What's the .NET equivalent?

BTW, I know that I can harken back to IsNumeric. I'm trying to purge any
trace of VB6 from my code.

TIA,
--
Joe
Feb 6 '06 #1
7 1895
Joe
Thanks.
--
Joe
"brians[MCSD]" wrote:
Hello Joe - do a search on this group for IsNumeric and you'll find an
enlightening thread from 1/15/2006. Essentially, the thread boils down to the
TryParse() method.

--
brians
http://www.limbertech.com
"Joe" wrote:
Hello All:

Does anyone know how someone would check for a numeric value in .NET? In
VB6, we used IsNumeric. What's the .NET equivalent?

BTW, I know that I can harken back to IsNumeric. I'm trying to purge any
trace of VB6 from my code.

TIA,
--
Joe

Feb 6 '06 #2
Hello Joe - do a search on this group for IsNumeric and you'll find an
enlightening thread from 1/15/2006. Essentially, the thread boils down to the
TryParse() method.

--
brians
http://www.limbertech.com
"Joe" wrote:
Hello All:

Does anyone know how someone would check for a numeric value in .NET? In
VB6, we used IsNumeric. What's the .NET equivalent?

BTW, I know that I can harken back to IsNumeric. I'm trying to purge any
trace of VB6 from my code.

TIA,
--
Joe

Feb 6 '06 #3
There is no direct equivalent in the .NET framework, but if you're using
VB.NET, IsNumeric is still a legitimate function that is not obsolete in any
way. So feel free to use it. For that matter, even if you're using C# you
can import the visual basic namespace and use the function that way. Some
things are just better about VB and that's ok.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:80**********************************@microsof t.com...
Hello All:

Does anyone know how someone would check for a numeric value in .NET? In
VB6, we used IsNumeric. What's the .NET equivalent?

BTW, I know that I can harken back to IsNumeric. I'm trying to purge any
trace of VB6 from my code.

TIA,
--
Joe

Feb 6 '06 #4
The VB 2005 equivalent is IsNumeric().

Mike Ober.

"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:80**********************************@microsof t.com...
Hello All:

Does anyone know how someone would check for a numeric value in .NET? In
VB6, we used IsNumeric. What's the .NET equivalent?

BTW, I know that I can harken back to IsNumeric. I'm trying to purge any
trace of VB6 from my code.

TIA,
--
Joe


Feb 7 '06 #5
Joe
Thanks.
--
Joe
"Steve C. Orr [MVP, MCSD]" wrote:
There is no direct equivalent in the .NET framework, but if you're using
VB.NET, IsNumeric is still a legitimate function that is not obsolete in any
way. So feel free to use it. For that matter, even if you're using C# you
can import the visual basic namespace and use the function that way. Some
things are just better about VB and that's ok.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:80**********************************@microsof t.com...
Hello All:

Does anyone know how someone would check for a numeric value in .NET? In
VB6, we used IsNumeric. What's the .NET equivalent?

BTW, I know that I can harken back to IsNumeric. I'm trying to purge any
trace of VB6 from my code.

TIA,
--
Joe


Feb 7 '06 #6
Joe
Michael,

In which namespace?
--
Joe
"Michael D. Ober" wrote:
The VB 2005 equivalent is IsNumeric().

Mike Ober.

"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:80**********************************@microsof t.com...
Hello All:

Does anyone know how someone would check for a numeric value in .NET? In
VB6, we used IsNumeric. What's the .NET equivalent?

BTW, I know that I can harken back to IsNumeric. I'm trying to purge any
trace of VB6 from my code.

TIA,
--
Joe


Feb 7 '06 #7
In the default namespace when I create a VB 2005 application.

Mike.

"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:5A**********************************@microsof t.com...
Michael,

In which namespace?
--
Joe
"Michael D. Ober" wrote:
The VB 2005 equivalent is IsNumeric().

Mike Ober.

"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:80**********************************@microsof t.com...
Hello All:

Does anyone know how someone would check for a numeric value in .NET? In VB6, we used IsNumeric. What's the .NET equivalent?

BTW, I know that I can harken back to IsNumeric. I'm trying to purge any trace of VB6 from my code.

TIA,
--
Joe



Feb 8 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: eje | last post by:
IsNumeric(value) should return false if value "can not be successfully converted to a Double." Instead I get the following error message: "Input string was not in a correct format." I use the...
4
by: Eugene Anthony | last post by:
I have received the following feedback for the two functions bellow: "The ISNUMERIC test is WORTHLESS for checking for an INT value, because ISNUMERIC will happily accept DOUBLE values, such as...
14
by: Kenny | last post by:
Hello, I would like to know if the function IsNumeric requires a header like #include <iostream> to be functionnal thanks ken
8
by: John Bowman | last post by:
Hello, Does anyone have a good/reliable approach to implementing an IsNumeric() method that accepts a string that may represent a numerical value (eg. such as some text retrieved from an XML...
10
by: michele | last post by:
I have a problem with VB.Net and IsNumeric() function because it always returns FALSE even the string can be a number. There is another strange thing, the same program (it is a test) runs good on...
8
by: Dave | last post by:
I'm trying to import Microsoft.VisualBasic to use the IsNumeric function in my C# code but all I see is: Microsoft.VisualBasic.VBCodeProvider while using Intellisense... From samples shouldn't...
7
by: Nathan Truhan | last post by:
All, I think I may have uncovered a bug in the IsNumeric function, or at least a misunderstanding on functionality. I am writing a Schedule Of Classes Application for our campus and have a...
9
by: Kimelia Schiles | last post by:
Hi, I am new to C#, and I am a VB programmer. I would like to know whether there is any function in C# that can is similar to IsNumeric in VB?
12
by: sck10 | last post by:
Hello, I am trying to determine if a value is NOT numeric in C#. How do you test for "Not IsNumeric"? protected void fvFunding_ItemInserting_Validate(object sender, FormViewInsertEventArgs...
9
by: =?Utf-8?B?VG9ueQ==?= | last post by:
Can anybody tell why IsNumeric("5-") is true?
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.