title: Unexpected symbol error when creating a c# array
body: <p>I have created a class (called Mood) which holds an int, a Vector4 and a float.</p>
  
  <p>I am trying to place three of these objects in an array using the code below:</p>
  
  <pre><code>static Vector4 p1 = new Vector4 (0,0,100,0);
  static Vector4 p2 = new Vector4 (80,0,0,80);
  static Vector4 p3 = new Vector4 (-80,0,0,80);
  
  private Mood[] moods = new Mood[10];
  
  moods[0] = new Mood (1,p1,0.0f);
  moods[1] = new Mood (2,p2,0.0f);
  moods[2] = new Mood (3,p3,0.0f);
  </code></pre>
  
  <p>However, this gives me the following errors which I don't really understand:</p>
  
  <blockquote>
    <p>Invalid rank specifier expected , or ] unexpected symbol new in class, struct or interface member declaration</p>
  </blockquote>
  
  <p>Could anyone explain what I have done wrong?</p>
  
  <p>the class looks like this</p>
  
  <pre><code>public class Mood
  {
      public int id = 0;
      public Vector4 pos = null; 
      public float dist = 0.0f;
  
      public Mood(int inID, Vector4 inPos, float inDist)
      {
          id = inID;
          pos = inPo; 
          dist = inDist;
      }
  } 
  </code></pre>