Ray's Asp.net Blog
Answers and code snippets from ASP.NET projects (Webforms/MVC/Classic ASP)
Pages
Event registration app with QR/Paypal
Home
Friday, August 5, 2011
How to check a string is in valid number format in C#?
public
static
bool
IsNumber(
string
str)
{
double
Number;
if
(
double
.TryParse(str,
out
Number))
return
true
;
return
false
;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment