我想做数字验证 方法如下
public static bool CheckInt(string str)
{
string strExp = @"^\d+?$";
Regex oReg = new Regex(strExp);
Match oCollection = oReg.Match(str);
if (oCollection.Success)
return true;
else
return false; }
字符型数字(如:1、2、3、4)和真正的数字(1.2.3.4.5.6)
但是输入字符型数字时会通过验证 而我想要的是真正的数字
不知如何解决
public static bool CheckInt(string str)
{
string strExp = @"^\d+?$";
Regex oReg = new Regex(strExp);
Match oCollection = oReg.Match(str);
if (oCollection.Success)
return true;
else
return false; }
字符型数字(如:1、2、3、4)和真正的数字(1.2.3.4.5.6)
但是输入字符型数字时会通过验证 而我想要的是真正的数字
不知如何解决
VbStrConv.Narrow是半角