title: Creating a generic setter which I can use to set any property within a class
body: <p>I know this is possible to do i am just striking a complete blank here. Basically what I want to have is the following:</p>
  <pre><code>public abstract class Object
  {
       private int id;
  
       public virtual int Id 
       {
           get =&gt; id;
           set =&gt; Set(ref id, value)
       }
  
       public bool Set&lt;T&gt;(ref T field, T value) 
       {
           ????
       }
  }
  </code></pre>
  <pre><code>public abstract class DerivedObject : IdObject
  {
       private string name;
  
       public string Name
       {
           get =&gt; name;
           set =&gt; Set(ref name, value);
       }
  }
  </code></pre>
  <p>This might be a little confusing but what i want to have happen is that I want to have the option to have all classes that derive from Id Object to be able to use the <code>Set()</code> method to change the values to their properties, it has something to do with how I want to implement <code>IRevertibleChangeTracking</code> but go deeper with it.</p>
  <p>Is there anyone who can assist me with this? Basically I need the blanks (?'s) filled in to populate the <code>Set()</code> method within the top class</p>
  <p>EDIT: edited the Set() method to reflect Code Casters comment</p>