c# 字符串转为数字

C#判断输入是否数字

 1 /// <summary>
 2 /// 判断输入是否数字
 3 /// </summary>
 4 /// <param name="num">要判断的字符串</param>
 5 /// <returns></returns>
 6 static public bool VldInt(string num)
 7 {
 8     #region
 9     int ResultNum;
10     return int.TryParse(num, out ResultNum);
11     #endregion
12 }

http://www.cnblogs.com/zhouzangood/articles/3613738.html

posted @ 2018-04-27 10:02  Youse的二分口粮地  阅读(680)  评论(0)    收藏  举报