title: How to make the inherited class's constructor run after a class's constructor
body: <p>I have 2 classes: <code>Base</code> and <code>Main</code>. When I run the <code>Main</code>'s constructor, I want to run some code <strong>BEFORE</strong> the <code>Base</code>'s constructor runs. In <code>java</code>, it's easy, you write some code then use <code>super</code>. Is there a way to achive the same result using <code>C#</code>?</p>
  
  <pre><code>class Base
  {
      public string myString = "Hi";
      public Base(string str)
      {
          myString += str;
      }
  }
  
  class Main : Base
  {
      public Main() : base(" world")
      {
          base.myString = "Hello";
      }
  }
  
  class Program
  {
      Console.WriteLine(new Main().myString);
  }
  </code></pre>
  
  <p>I expect the output to be <code>Hello world</code>, but it's only <code>Hello</code>, because the <code>Main</code>'s constructor run after the <code>Base</code>'s constructor.</p>