Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public string CodePostal
  2. {
  3. get
  4. {
  5. return this.codePostal;
  6. }
  7.  
  8. set
  9. {
  10. Match m = Regex.Match(value, "^[0-9]{5}$");
  11. if(m.Success)
  12. this.codePostal = value;
  13. else
  14. throw new ArgumentException("value");
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement