title: C# masked text box
body: <p>How can I change masked text box properties for IP address input?
  For example </p>
  
  <pre><code>private void Interneta_savienojums_Load(object sender, EventArgs e)
  {
      maskedTextBox1.Text = "   .   .   .   ";
      maskedTextBox1.PromptChar = ' ';
      maskedTextBox1.Mask = "009.009.009.900";
      maskedTextBox1.ResetOnSpace = false;
      maskedTextBox1.SkipLiterals = false;
  }
  </code></pre>
  
  <p>In form text box show (   .   .   .   ), exactly what I want. When my input is 123.123.123.123
  everything is okay, but when I input  <code>23 .1  .001.200</code>, the return value is <code>23 .1  .001.200</code>, but I need <code>23.1.1.200</code>.  How can I remove spaces, and return the normal value? Is this possible or not?</p>
  
  <p>For ip check i use ,and this is solution !</p>
  
  <pre><code>try
          {
              IPAddress IP = IPAddress.Parse("127.0.0.000");
              MessageBox.Show(IP.ToString());
          }
          catch (FormatException)
          {
              MessageBox.Show("Wrong ip !");
          }
  </code></pre>