Hello, I used to work on the following subject for 3 days.
I have a masked textbox event:
- private void button4_Click(object sender, EventArgs e)
- {
- maskedTextBox1.Mask = "999-000-0000";
- }
-
-
-
- private void button5_Validating(object sender, CancelEventArgs e)
- {
- string text = this.Password
- string pat = @"^9994714711"
- Regex itsme = new Regex(pat, RegexOptions.IgnoreCase);
- Match itsme2 = itsme.Match(text);
- if (itsme2.Success) { }
- else
- {
- MessageBox.Show("Something wrong happend, no match", "Error");
- e.Cancel = true;
- }
- }
I recieve allways Error-Messages
Can somebody help me?