[Ironruby-core] Referencing a CLR List in IronRuby
Cory.Foy at microsoft.com
Thu Oct 11 16:09:00 EDT 2007
And if anyone is wondering, the set would be:
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Eric Nicholson
Sent: Thursday, October 11, 2007 4:00 PM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] Referencing a CLR List in IronRuby
Good Call. foo.get_Item() works great. foo throws an exception.
Thanks Justin! That's much better than ToArray.GetValue...
On 10/11/07, Justin Bailey <jgbailey at gmail.com<mailto:jgbailey at gmail.com>> wrote:
On 10/11/07, Eric Nicholson <enicholson at gmail.com<mailto:enicholson at gmail.com>> wrote:
I can't figure out how to get items out of any of the CLR List types in IronRuby. Here's a contrived example:
>>> require 'mscorlib'
>>> foo = System::Collections:: ArrayList.new()
System.MissingMethodException: undefined local variable or method `Item' for #<ArrayList:0x0000056>:ArrayList
The actualy method name will be get_Item(), I think. But did you try
Ironruby-core mailing list
Ironruby-core at rubyforge.org<mailto:Ironruby-core at rubyforge.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironruby-core