public MainWindow()
 {
     InitializeComponent();
     Person p = new Person();
     // p.CPR = "as345as123";
     Debug.WriteLine(p.getYear("2802902673"));
 }
 private void CheckCpr(object sender, RoutedEventArgs e)
 {
     Person p = new Person();
     try {
         p.CPR = Txbox.Text;
         int y;
         int m;
         int d;
         p.ExtractYmd(p.CPR, out y, out m, out d);
         LblText.Content = "" + d + ". " + monthsStrings[m - 1] + " " + y;
     }
     catch
         (ArgumentException ex) {
         LblText.Content = ex.Message;
     }
 }