title: Calculating age from social security number - how?
body: <p>I'm pretty new to C# and got this assignment. I have a class called person with some details, of which one is the social security number (CPR number). From this number I need to calculate the age of this person. It needs to fit in this, according to assignment, if i understand it right:</p>
  
  <pre><code>public class Person
  {
      int _Cpr;
  
      public int Age
      {
          get
          {
              return (age calculation from cpr number somehow)
          }
      }
  }
  </code></pre>
  
  <p>I however have no idea how to do so - I'm guessing I need to compare the social security number integer having this form: DDMMYYXXXX to the current date, and return the difference in rounded down years - but I have no idea how to do so.</p>
  
  <hr>
  
  <p>I'm starting to get the picture as how to calculate the age - What I'm still lost on, is how to fit this into the code i have. The description I have says that the Age should be a "calculated property" - But I can't create variables to use inside a class definition as far as i know, so i can't really do all the steps required to make Cpr into Age - Can I?</p>