摘要:
判断一个string是否可以为数字方案一:Try...Catch(执行效率不高)/// /// 名称:IsNumberic/// 功能:判断输入的是否是数字/// 参数:string oText:源文本/// 返回值: bool true:是 false:否/// /// /// private bool IsNumberic(string oText){try {int var1=Convert.ToInt32 (oText);return true; }catch{return false;}}方案二:正则表达式(推荐)a)using System;using System.Text.Re 阅读全文
posted @ 2012-04-12 22:02
AnyYoung
阅读(387)
评论(0)
推荐(0)

浙公网安备 33010602011771号