Article ID: 329488 - Last Review: July 16, 2008 - Revision: 3.1 How to implement Visual Basic .NET IsNumeric functionality by using Visual C#
This article was previously published under Q329488 On This PageSUMMARY This step-by-step article describes how to use the
Microsoft Visual Basic .NET IsNumeric function in Visual C#. The IsNumeric function returns a Boolean value that indicates whether an
expression can be evaluated as a number. The IsNumeric function returns True when the data type of the expression is Short, Integer, Long,
Decimal, Single, or Double. It also returns True if the expression is a string that can be successfully converted
to a Double. Create the IsNumeric FunctionIn Visual C#, you can use the Double.TryParse method to obtain functionality that is similar to IsNumeric. Double.TryParse converts the string representation of a number in a specified style and culture-specific format to its double-precision floating point number equivalent. To create the IsNumeric function:
Test the CodeTo test the IsNumeric function:
REFERENCESFor more information about the TryParse function, visit the following Microsoft Developer Network (MSDN)
Web site: Double.TryParse Method For additional
information, click the following article number to view the article in the
Microsoft Knowledge Base: http://msdn.microsoft.com/en-us/library/system.double.tryparse(VS.71).aspx (http://msdn.microsoft.com/en-us/library/system.double.tryparse(VS.71).aspx) 325961
(http://support.microsoft.com/kb/325961/EN-US/
)
HOW TO: Call Visual Basic .NET Run-Time Library Members from Visual C# .NET
| Other Resources Other Support Sites
CommunityGet Help NowArticle Translations
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top
