[Ironruby-core] 2d array

Curt Hagenlocher curth at microsoft.com
Sun Nov 29 19:44:42 EST 2009

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.

From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards
Sent: Sunday, November 29, 2009 4:41 PM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] 2d array

I have some C# code which is expecting a 2d array.

public static class Foo
    public static int Bar(object[,] inArray)
    { ... }

Is there any way that I can call this from IronRuby? I can't figure out how to create the 2d array?

I have a feeling this has been asked before, but I can't find any info about it...

Cheers, Orion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20091130/5590ef38/attachment.html>

More information about the Ironruby-core mailing list