
/// 验证Int型
public static bool IsInt ( string source )
{
Regex regex = new Regex ( @"^(-){0,1}\d+$" );
if ( regex.Match ( source ).Success )
{
if ( ( long.Parse ( source ) > 0x7fffffffL ) || ( long.Parse ( source ) < -2147483648L ) )
{
return false;
}
return true;
}
return false;
}




by: 发表于:2018-01-31 15:11:26 顶(0) | 踩(0) 回复
??
回复评论