title: Subscribe to something like on object instance being assigned event
body: <p>Here is what I am trying to do. I am making a class which contains indexer for accessing fields within the class, and for adding/removing new fields. Basically the class is like a class with set of static and dynamic fields. I am using a dictionary for the indexer. My problem is that how would I find out and update the static object in the dictionary when the user explicitly reinitialized one of the field? example:</p>
  
  <pre><code>public class foo
  {
  }
  
  public class bar
  {
      Dictionary&lt;string, foo&gt; dict = new Dictionary&lt;string, foo&gt;();
  
      public bar()
      {
           //using reflection to initialize all fields
      }
  
      public foo this[string name]
      {
          get
          {
              return dict[name];
          }
      }
  }
  
  public class bar2:bar //Note: defined by the user, can't use get/setter to update it
  {
        public foo field1; 
        public foo field2;
        public foo field3;
  }
  
  public static void main()
  {
      bar2 test = new bar2();
      test.field1 = new foo();
      test["field1"] //this points to the old field1. How can I update it automatically when test.field1 = new foo(); is called?
  }
  </code></pre>
  
  <p>Some of you might suggest me to use reflection to do it, but what if the user called remove "field1" and added a new dynamic field called field1, I would want to return the new one created by the user instead of the one defined in the class. </p>