判断是不是数字

public static bool IsNum(String str)
  {
   for(int i=0;i<str.Length;i++)
   {
    if(str[i]<'0' || str[i]>'9')
     return false;
   }
   return true;
  }
posted on 2009-07-30 11:39  jameshappy  阅读(267)  评论(0)    收藏  举报