http://expert.csdn.net/Expert/topic/1860/1860698.xml?temp=.1703302
这里讨论得比较详细.
hope it helps

解决方案 »

  1.   

    public static bool isNUM(string Str)      
      {
       bool blResult = true;
       if(Str == "")
        blResult = false;
       else
       {
        foreach (char Char in Str)
        {
         if(!char.IsNumber(Char))
         {
          blResult = false;
          break;
         }
        }
        if (blResult)
        {
         if (int.Parse(Str) == 0)
          blResult = false;
        }
       }
       return blResult;
      }
      

  2.   

    如果TextBox的ID是  TextBox1,这样判断就可以了isNum(TextBox1.Text);