- Posted by Shay Friedman on November 29, 2008
The Problem
Currently, if you have a .Net class you want to access via IronRuby, and you have an indexer there (like myObject[2]), you won't be able to use the indexer with brackets [] from IronRuby. You'll get an exception.
The Solution
Use get_Item(index) instead (pay attention to casing).
Example
my_dataset.Tables[0] # <-- This won't work
my_dataset.Tables.get_Item(0) # <-- This will work great!
All the best,
Shay.