title: Using Regex Inside Property Setter
body: <p>I need to know how to combine properties and regex. Here's the property:</p>
  
  <pre><code>public string NameFormal        
  {       
      get {return nameFormal;}    
      set     
      {   
          nameFormal = value;
      }   
  }
  </code></pre>
  
  <p>I'd like to use the setter to validate input using a regex pattern that I already have. I could write a separate bool function to yes/no the match. But how do I do that inside a property that returns a string?   Appreciate the help.</p>
  
  <p>I'm using VS2010.   </p>