Dot Net Sample Codings
Thursday, January 10, 2013
How to check given string is Integer or not in Server side Using LINQ
bool
IsNumber(
string
s)
{
if
(s.Any(c => !
Char
.IsDigit(c)))
{
return
false
;
}
return
(s.Length > 0);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment