title: Confusion Regarding Default Constructor
body: <pre><code>using System;
  class Test
  {
      string name;
      int num1, num2;
  
      public Test()
      {
          num1=10;
          num2=20;
      }
  
      public void Show()
      {
          Console.WriteLine(num1+num2);
          Console.WriteLine(name);
      }
  
  }
  
  class TestDemo
  {
      static void Main()
      {
          Test ob = new Test();
          ob.Show();
      }
  }
  </code></pre>
  
  <p>Confusion:</p>
  
  <p>The Complete Reference C# 3.0 says that a default constructor will not be called if you define your own constructor. I did that thing, but left the string variable without initializing it with my defined constructor. Now according to above concept the string variable is not initialized and no default constructor will run to give it a default value because I have defined my own.</p>
  
  <p>So, why it does not show an error, that string is not initialized with any value or something similar. Doesn't it show that it has been assigned a value from somewhere [default constructor of compiler]?</p>