title: Modifying a class instance from inside the class
body: <p>suppose i had a serializeable class such as</p>
  
  <pre><code>[Serializable]
      public class DatabaseViewModel:MVVM.ObservableObject 
      {
          //fields
          //properties
  
          public DatabaseViewModel()
          {
             //if a serialization file exists then deseralize and make this instance equal to it
             //else initialize fields
          }
      }
  </code></pre>
  
  <p>is it possible to do such thing from inside the class and not the calling scope?</p>
  
  <p>in the calling scope i would just do</p>
  
  <pre><code>var dbvm = new DatabaseViewModel();
  </code></pre>
  
  <p>and then i want the constructor to decide if it should create a new object or load a serialized object.</p>
  
  <p>inside my class i tried this</p>
  
  <pre><code>this = //my serialized object 
  </code></pre>
  
  <p>if i wanted to do it from the calling scope i would just do</p>
  
  <pre><code>DatabaseViewModel dbvm = null;
  if(File.Exists(".../DatabaseViewModel.bin")
  dbvm = //deserialize .../DatabaseViewModel.bin
  else
  dbvm = new DatabaseViewModel();
  </code></pre>