Google Answers Logo
View Question
 
Q: Programming in .net ( Answered 4 out of 5 stars,   1 Comment )
Question  
Subject: Programming in .net
Category: Computers > Programming
Asked by: elraitan-ga
List Price: $2.00
Posted: 16 Oct 2002 13:02 PDT
Expires: 15 Nov 2002 12:02 PST
Question ID: 77385
In visual Basic Script there is a function called isNumeric().  I need
to know how to achive that same functionality in c#?
Answer  
Subject: Re: Programming in .net
Answered By: omniscientbeing-ga on 16 Oct 2002 16:48 PDT
Rated:4 out of 5 stars
 
elraitan-ga,

The short answer to your question is that there is no function in C#
which is  equivilant to the isnumeric() function in VB.

However, you can usein C#, a VB6 compatibility library to achieve the
same thing.

Here is more information on exactly how to do this, from VBCity.com
Forums:

http://www.vbcity.com/forums/topic.asp?tid=7267

Google search strategy: 

Keywords, "C# isnumeric() function"

://www.google.com/search?hl=en&ie=ISO-8859-1&q=C%23+isnumeric%28%29+function

Good luck in continuing your inquiries!

~omniscientbeing-ga
elraitan-ga rated this answer:4 out of 5 stars
This was an experiment to see what you would produce.  There were
about three other answers as well but I too like this one the best. 
Good job!

Comments  
Subject: Re: Programming in .net
From: nickparker-ga on 27 Dec 2003 14:39 PST
 
elraitan,
   The .NET BCL provides static methods such as Char.IsDigit and
Char.IsNumber.  Please check the MSDN online documentation listed
below for their implementation:

<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemCharClassIsDigitTopic.asp"
target="_blank">Char.IsDigit Method</a>
<br>
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemCharClassIsDigitTopic.asp"
target="_blank">Char.IsNumber Method</a>

Hope this helps,
                Nick Parker

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy