int iNum = 0; string sNumber = "1003"; int iResult = 0; int.TryParse(sNumber, out iResult); if (iResult == 1) { iNum = int.Parse(sNumber); }
时间: 2024-10-28 14:46:59
int iNum = 0; string sNumber = "1003"; int iResult = 0; int.TryParse(sNumber, out iResult); if (iResult == 1) { iNum = int.Parse(sNumber); }