title: Private inner classes in C# - why aren't they used more often?
body: <p>I am relatively new to C# and each time I begin to work on a C# project (I only worked on nearly mature projects in C#) I wonder why there are no inner classes?</p>
  
  <p>Maybe I don't understand their goal. To me, inner classes -- at least private inner classes -- look a lot like "inner procedures" in Pascal / Modula-2 / Ada : they allow to break down a main class in smaller parts in order to ease the understanding.</p>
  
  <p>Example : here is what is see most of the time :</p>
  
  <pre><code>public class ClassA
  {
     public MethodA()
     {
        &lt;some code&gt;
        myObjectClassB.DoSomething(); // ClassB is only used by ClassA
        &lt;some code&gt;
     }
  }
  
  public class ClassB
  {
     public DoSomething()
     {
     }
  }
  </code></pre>
  
  <p>Since ClassB will be used (at least for a while) only by ClassA, my guess is that this code would be better expressed as follow :</p>
  
  <pre><code>   public class ClassA
     {
        public MethodA()
        {
           &lt;some code&gt;
           myObjectClassB.DoSomething(); // Class B is only usable by ClassA
           &lt;some code&gt;
        }
  
        private class ClassB
        {
           public DoSomething()
           {
           }
        }
     }
  </code></pre>
  
  <p>I would be glad to hear from you on this subject - Am I right?</p>