if(!string.IsNullOrEmpty(a)){
decimal isNum = 0m;
try{
isNum = deciaml.parse(a);
}
catch(Exception ex){
throw new Exception("不是数字!");
}
}
判断是否为数字的方法
最新推荐文章于 2023-03-24 22:51:31 发布
if(!string.IsNullOrEmpty(a)){
decimal isNum = 0m;
try{
isNum = deciaml.parse(a);
}
catch(Exception ex){
throw new Exception("不是数字!");
}
}