title: How to make a class act as array?
body: <p>Classes with an Indexer are not an <code>System.Array</code>.  But I want to use my implementation like an array. Accessing Extension Methods for example.  </p>
  
  <p>Is there a way to achieve this?</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class MyArray&lt;T&gt; 
  {
      private T[] _array;
  
      public MyArray(int size)
      {
          _array = new T[size];
      }
  
      public T this[int index] 
      {
          get { return _array[index]; }
          set { _array[index] = value; }
      }
  }
  
  public static class ArrayExtensions 
  {
      public static void T[] Foo(this T[] array)
      {
          // ..
      }
  }
  
  public class ArrayUser
  {
      public ArrayUser()
      {
          var a = new MyArray(10);
          a.Foo(); // does not compile, Foo() is unknown
      }
  }
  </code></pre>