title: Masked TextBox Validating Text Error
body: <p>I'm having some trouble with date variables extracted from a masked textbox on a WinForms app.
  The code which attempts to read the user input date is as follows:</p>
  
  <pre><code>DateTime datExpDate = new DateTime();
  datExpDate = (DateTime)txtExpDate.ValidateText();     
  </code></pre>
  
  <p>But I get a NullReferenceException error, even when the masked text box is deinately not Null.</p>
  
  <p>The properties on the masked text box include:</p>
  
  <p>Mask:  00/00/0000
  Validating Type:  DateTime
  TextMaskFormat:  IncludeLiterals</p>
  
  <p>This is exactly as I have used masked textboxes on previous apps and it worked then, so why not now?</p>
  
  <p>Can anyone spot what I am doin wrong please?</p>