title: Accessing array elements of a List<object[]> in foreach loop
body: <p>This is what I have:</p>
  
  <pre><code>List&lt;object[]&gt; markers = new List&lt;object[]&gt;();
  
  object[] marker = new object[2];
  marker[0] = new Vector2(1, 2);
  marker[1] = new Vector4(1, 2, 3, 4);
  markers.Add(marker);
  
  foreach (var item in markers)
  {
      int x = (Vector2)item[0].X; // Error: 'object' does not contain a definition
                                  // for 'X' and no extension method 'X' accepting
                                  // a first argument of type 'object' could be
                                  // found (are you missing a using directive or
                                  // an assembly reference?)
      // other stuff
  }
  </code></pre>
  
  <p>Is there a way to make this work without losing code readability, or should I try using a class instead of object array?</p>