title: Implicit array casting in C#
body: <p>I have the following classes with an implicit cast operator defined:</p>
  
  <pre><code>class A
  {
      ...
  }
  class B
  {
      private A m_a;
  
      public B(A a)
      {
          this.m_a = a;
      }
  
      public static implicit operator B(A a)
      {
          return new B(a);
      }
  }
  </code></pre>
  
  <p>Now, I can implicitly cast A to B.</p>
  
  <p>But why can't I implicitly cast A[] to B[] ?</p>
  
  <pre><code>static void Main(string[] args)
  {
      // compiles
      A a = new A();
      B b = a;
  
      // doesn't compile
      A[] arrA = new A[] {new A(), new A()};
      B[] arrB = arrA;
  }
  </code></pre>
  
  <p>Thanks, Malki.</p>