标签:c# string int 转化
int iNum = 0; string sNumber = "1003"; int iResult = 0; int.TryParse(sNumber, out iResult); if (iResult == 1) { iNum = int.Parse(sNumber); }
C# -- 判断字符是否能转化为整形
原文地址:http://blog.csdn.net/jcx5083761/article/details/40080827