title: How do i change the call order of nested constructors (child before abstract parent)
body: <p>The code below throws an exception because the abstract constructor is called before the child constructor.</p>
  
  <p>I need to provide an abstract class to capsule some logic from a different part of the program. However i also need to check if the abstract members are initialised correctly rigth after creation without the childclass having any influence over this.</p>
  
  <p>the compiling example below should illustrate my question.</p>
  
  <pre><code>using System;
  
  namespace Stackoverflow
  {
      class Program
      {
          static void Main(string[] args)
          {
              var x = new Thing(5);
              var y = new Child(x);
          }
      }
  
      class Child : AbstractParent
      {
          Thing childthing;
  
          public Child(Thing provided) : base(){
              childthing = provided;
          }
  
          public override void Initialise(){
              //Exception is thrown here - childthing is still null
              parentthing = childthing.Add(1);
          }
      }
  
      abstract class AbstractParent
      {
          protected Thing parentthing;
  
          public AbstractParent(){
              Initialise();
              AssertThingyNotNull();
          }
  
          private void AssertThingyNotNull(){
              if (parentthing == null) throw new Exception("Waaa");
          }
  
          public abstract void Initialise();
  
      }
  
      class Thing
      {
          private int i;
  
          public Thing(int i){
              this.i = i;
          }
  
          public Thing Add(int b){
              i += b;
              return new Thing(i);
          }
      }
  }
  </code></pre>
  
  <p>Edit #1: </p>
  
  <p>Is there some way to do this by reflecting into the caller (should be the creator of child rigth?) and then reacting on the end of that call?</p>
  
  <p>Edit #2:
  Getting the .ctor that creates the child is easy. Manipulating the methods seems something between impossible and a bad idea.</p>
  
  <pre><code>        foreach (StackFrame frame in new StackTrace().GetFrames())
          {
              Console.WriteLine(frame.GetMethod().Name);
          }
  </code></pre>