自己写.比如.
private void textBox1_TextChanged(object sender, System.EventArgs e)
{
if(System.Text.RegularExpressions.Regex.IsMatch(textBox1.Text,@"^\d*$"))
{
//是数字.
}}

解决方案 »

  1.   

    自己写.比如.
    private void textBox1_TextChanged(object sender, System.EventArgs e)
    {
    if(System.Text.RegularExpressions.Regex.IsMatch(textBox1.Text,@"^\d*$"))
    {
    //是数字.
    }}
      

  2.   

    不用自己写,math类中有方法!
      

  3.   

    To hillwell(天子门生):
    真有?我这个答案可是从你的提问中拷贝来的? :)
      

  4.   

    有吧,你查帮助好象还有isDigit()
      

  5.   

    赋给一个double 变量 然后try~catch