IsAlphabets Validation

Nadeemshaik
Posted by Nadeemshaik under C# category on | Points: 40 | Views : 694
 public  bool IsAlphabets(string stringValue)
{
bool m_result = true;
string m_strValue = stringValue.Trim();

System.Text.RegularExpressions.Regex rx = new System.Text.RegularExpressions.Regex(@"^[a-zA-Z]+$");
if (!rx.IsMatch(m_strValue))
{
m_result = false;
}
return m_result;
}

Comments or Responses

Login to post response