判断是否是整数

 

public static bool IsInt(string value)     
{         
  return Regex.IsMatch(value, @"^[+-]?\d*$");     
}
posted @ 2012-09-05 22:34  stevejson  阅读(396)  评论(0编辑  收藏  举报