title: Formatting a Textbox (Phone Numbers, Mobile Numbers, Emails)
body: <p>I'd like to know how to cast textbox input into different formats. I tried using Format.String() since it's the 'solution' I found online after doing some research but it did not end well for me. </p>
  
  <pre><code>  private void RegHomePhoneTBox_TextChanged(object sender, EventArgs e)
      {
          string s = RegHomePhoneTBox.Text;
          double sAsD = double.Parse(s);
          RegHomePhoneTBox.Text = string.Format("{0:###-####}", sAsD).ToString();
      }
  </code></pre>
  
  <p>This was the code block I used and it just keep on throwing an error.</p>
  
  <blockquote>
    <p>An unhandled exception of type 'System.FormatException' occurred in
    mscorlib.dll Additional information: Input string was not in a correct
    format.</p>
  </blockquote>