kelumKP / Sample-Codes

This is sample code 100% made by me for future references
0 stars 0 forks source link

check valid 10 digit phone number #13

Open kelumKP opened 8 years ago

kelumKP commented 8 years ago
        public bool checkValidMobileNo(string mobileno)
        {
            Regex expr = new Regex(@"^[0-9]{10}$");
            if (expr.IsMatch(mobileno))
            {
                return true;
            }
            else return false;
        }