title: Binding multi-dimentional arrays in Xamarin
body: <p>I'm trying to bind an property which I know to be a (multi-dimentional) <code>NSArray</code> holding <code>NSArray</code> objects which in turn hold instances of <code>NSObject</code>. I've bound the method as such:</p>
  
  <pre><code>[Export ("options")]
  NSObject[][] Options { get; set; }
  </code></pre>
  
  <p>When I build my bindings I get the following errors in the generated class for the above property.</p>
  
  <p>From a generated call to <code>NSArray.FromNSObjects</code>:</p>
  
  <pre><code>(1) Argument `#1` cannot convert 'Foundation.NSObject[][]' expression to type 'Foundation.NSObject[]'.
  (2) Error CS1502: The best overloaded method match for `Foundation.NSArray.FromNSObjects(params Foundation.NSObject[])' has some invalid arguments (CS1502)
  </code></pre>
  
  <p>From a generated call to <code>NSArray.ArrayFromHandle&lt;Foundation.NSObject[]&gt;</code>:</p>
  
  <pre><code>(1) Error CS0311: The type `Foundation.NSObject[]' cannot be used as type parameter `T' in the generic type or method `Foundation.NSArray.ArrayFromHandle&lt;T&gt;(System.IntPtr)'. There is no implicit reference conversion from `Foundation.NSObject[]' to `ObjCRuntime.INativeObject' (CS0311)
  </code></pre>
  
  <p>The errors keep referring to the compilers inability to convert between <code>Foundation.NSObject[][]</code> and <code>Foundation.NSObject[]</code>. I can't see why this would be a problem, <code>NSArray</code> is a subclass of <code>NSObject</code>, so why can't it treat the second array dimension as an <code>NSObject</code>?</p>
  
  <p>(I know I have alternatives, such as binding the Options as <code>NSObject[]</code>, or just simply <code>NSObject</code>, but I'd rather be as type safe as possible.)</p>