title: How can I validate text box for telephone Number in windows Forms?
body: <pre><code>if(textBox1.TextLength !=10)
  {
      MessageBox.Show("Wrong Telephone No Please check it again",
                      "ERROR",MessageBoxButtons.OK,MessageBoxIcon.Information);
  }   
  </code></pre>
  
  <p>I try this code for validate text box for telephone number in c# .I assume that user must enter 10 numbers.But this didn't work correctly. This code allows digits and also characters. How can I validate text box that allows only 10 digits &amp; only digits.</p>