title: Private constructor in C#
body: <p>I am reading <em>Beginning Visual C# 2012</em>. </p>
  
  <p>Consider:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Text;
  
  namespace Ch10Ex01
  {
      class MyClass
      {
          public readonly string Name;
          private int intVal;
  
          public int Val
          {
              get { return intVal; }
              set
              {
                  if (0 &lt;= value &amp;&amp; value &lt;= 10)
                      intVal = value;
                  else
                      throw (new ArgumentOutOfRangeException("Val", value,
                          "Val must be assigned a value between 0 and 10."));
              }
          }
  
          public override string ToString()
          {
              return "Name: " + Name + "\nVal: " + Val;
          }
  
          private MyClass() : this("Default Name")
          {
          }
  
          public MyClass(string newName)
          {
              Name = newName;
              intVal = 0;
          }
      }
  }
  </code></pre>
  
  <p>Explanation in the book: Note that I've used this ("Default Name") to ensure that Name gets a value if this constructor ever gets called, which is possible if this class is used to derive a new class. This is necessary as not assigning a value to the Name field could be a source of errors later.</p>
  
  <p>What's puzzling me: How can it be used in a derived class as it's "private"? What does this ("Default Name") mean? How does the object get the "Default Name" as its name?</p>