[Ironruby-core] 2d array

Orion Edwards orion.edwards at gmail.com
Sun Nov 29 20:09:49 EST 2009


This worked for me:

System::Array.CreateInstance(System::Object.to_clr_type, 5, 6)

Getting and setting works using x[1,2] as you'd expect

Cheers!

On Mon, Nov 30, 2009 at 1:44 PM, Curt Hagenlocher <curth at microsoft.com>wrote:

>  You can create an array using the BCL by calling Array.CreateInstance.
> >From C#, it would look like this:
>
>
>
> Array.CreateInstance(typeof(object), 5, 6)); // Equivalent to new
> object[5,6]
>
>
>
> I don't have IronRuby on this machine and don't want to guess at the right
> syntax.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20091130/99e893b2/attachment.html>


More information about the Ironruby-core mailing list