/**/
/// <summary>
/// 判断数据字符是否为数字
/// </summary>
/// <param name="strCode">需要判断的字符串</param>
/// <returns></returns>
public bool IsNumeric( string strCode)
... {
if (strCode == null || strCode.Length == 0)
...{
return false;
}
ASCIIEncoding ascii = new ASCIIEncoding();
byte[] byteStr = ascii.GetBytes(strCode);
foreach (byte code in byteStr)
...{
if (code < 48 || code > 57)
return false;
}
return true;
}
/// 判断数据字符是否为数字
/// </summary>
/// <param name="strCode">需要判断的字符串</param>
/// <returns></returns>
public bool IsNumeric( string strCode)
... {
if (strCode == null || strCode.Length == 0)
...{
return false;
}
ASCIIEncoding ascii = new ASCIIEncoding();
byte[] byteStr = ascii.GetBytes(strCode);
foreach (byte code in byteStr)
...{
if (code < 48 || code > 57)
return false;
}
return true;
}