title: Capture property change using its setter
body: <p>I want to be notified when a property changes so that I can log the oldvalue and new value of the property in database.</p>
  
  <p>So I decided to go with the approach of property setter and have a generic method that handles all properties.</p>
  
  <p>I created below class:</p>
  
  <pre><code>public class PropertyChangedExtendedEventArgs&lt;T&gt; : PropertyChangedEventArgs
  {
      public virtual T OldValue { get; private set; }
      public virtual T NewValue { get; private set; }
  
      public PropertyChangedExtendedEventArgs(string propertyName,
                                              T oldValue, T newValue)
          : base(propertyName)
      {
          OldValue = oldValue;
          NewValue = newValue;
  
     //write to database the values!!!
      }
  }
  </code></pre>
  
  <p>and on my property I call it as such:</p>
  
  <pre><code>private string _surname;
  public string Surname
  {
      get { return _surname; }
      set 
      {
          string temp = Surname;
          _surname = value;
          Helper.PropertyChangedExtendedEventArgs("Surname", temp, value);
      }
  }
  </code></pre>
  
  <p>but it is first time working with generics so got few concerns :</p>
  
  <ul>
  <li>how do I call this on my property?</li>
  <li>is this a good approach? </li>
  <li>would I be able to call a function in public
  <code>PropertyChangedExtendedEventArgs(string propertyName, T oldValue, T newValue)</code> and save to database?</li>
  </ul>