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