问题已解决..共享代码...如下
           bool blnTest = false;
           bool _Result = true;
               Regex regex = new Regex("^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$");
            blnTest = regex.IsMatch(textEdit1.Text);
            if (blnTest == true)
            {
                string[] strTemp = this.textEdit1.Text.Split(new char[] { '.' }); // textBox1.Text.Split(new char[] { '.' });
                for (int i = 0; i < strTemp.Length; i++)
                {
                    if (Convert.ToInt32(strTemp[i]) > 255)
                    {       //大于255则提示,不符合IP格式   
                        MessageBox.Show("不符合IP格式");
                        _Result = false;
                    }                    
                }
            }
            else
            {
                //输入非数字则提示,不符合IP格式   
                MessageBox.Show("不符合IP格式");
                _Result = false;
            }