C#正则验证字符串是否全是数字
Regex r = new Regex(@"^\d+$"); if (r.Match(vlannumber).Success) { sql += " and a.vlannumber=" + vlannumber; } else { sql += " and a.memo like '%" + vlannumber + "%'"; }
Regex r = new Regex(@"^\d+$"); if (r.Match(vlannumber).Success) { sql += " and a.vlannumber=" + vlannumber; } else { sql += " and a.memo like '%" + vlannumber + "%'"; }