title: C#: Custom 2-dim arrays trouble
body: <p>I'm trying to create a two-dimensional array of my custom class <code>Cell</code> with the following code:</p>
  
  <pre><code>public class Cell
  {
      int top;
      int bottom;
  }
  
  public Form1()
  {
      Cell[,] elements;
      elements = new Cell[10,10];
  
      Random r = new Random();
  
      for (int i=0; i!=10; i++)
      {
          for (int j=0; j!=10; j++)
          {
              elements[i,j].top = r.Next();
          } 
      }
  }
  </code></pre>
  
  <p>But I always receive the following error:
      Inconsistent accessibility: ... and something about 'Cell is less accesible'...</p>
  
  <p>How do I correctly define a two-dimensional array of a custom class?</p>