title: Is it bad practice to initialise fields outside of an explicit constructor
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/24551/best-practice-initialize-class-fields-in-constructor-or-at-declaration">Initialize class fields in constructor or at declaration?</a>  </p>
  </blockquote>
  
  
  
  <p>We are arguing about coding practices. The examples here are a little too simple, but the real deal has several constructors. In order to initialise the simple values (eg dates to their min value) I have moved the code out of the constructors and into the field definitions.</p>
  
  <pre><code>public class ConstructorExample
  {
      string _string = "John";
  }
  
  public class ConstructorExample2
  {
      string _string;
  
      public ConstructorExample2()
      {
          _string = "John";
      }
  }
  </code></pre>
  
  <p>How should it be done by the book? I tend to be very case by case and so am maybe a little lax about this kind of thing. However i feel that occams razor tells me to move the initialisation out of multiple constructors. Of course, I could always move this shared initialisation into a private method.</p>
  
  <p>The question is essentially ... is initialising fields where they are defined as opposed to the constructor bad in any way?</p>
  
  <p>The argument I am facing is one of error handling, but i do not feel it is relevant as there are no possible exceptions that won't be picked up at compile time.</p>