C# 判斷字符串是否是22位數字

    


   protected bool IsNumeric(string tempstr)//如果是,返回true

        {
             System.Text.RegularExpressions.Regex rex = new System.Text.RegularExpressions.Regex(@"^\d{22}$");
             return (rex.IsMatch(tempstr));

        }


參考地址:http://www.cnblogs.com/laoxian/archive/2010/04/30/1724677.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章