title: C# Change 'this' from within object
body: <p>This is probably a terrible way of doing things, but here goes anyway...</p>
  
  <p>I want to re-initialise an object from within the object itself.</p>
  
  <p>I have an object called <code>Quote</code>, one of the methods is <code>Calculate()</code> and it does a lot of things. One thing is that if certain major properties are changed, we call it a Big Change and we need to create a new Quote (not just update the existing one).</p>
  
  <p>In the middle of <code>Calculate()</code> it would be really easy (IMO) to just do this:</p>
  
  <pre><code>public class Quote {
      public bool Calculate() {
  
          //... do lots of things
  
          if(IsBigChange) {
              this = new Quote();
          }
  
          //... do more things
          // later when it is saved it will be a new quote
  
      }
  }
  </code></pre>
  
  <p><code>Calculate()</code> is called from lots of places, so I don't really want to kick out when Big Change is detected and create the new object 'outside', if you know what I mean.</p>
  
  <p>So if you can't set <code>this</code>, is there another way of achieving the same result?</p>