tags:

views:

82

answers:

1

I'm trying to do some XNA development with IronRuby but are struggling with both generics (Load) and accessing some of the base-class properties such as Content.

Any hints?

+2  A: 

Regarding Generics - if you want to create a generic object, use square brackets in order to define the generic type. For example:

list = System::Collections::Generic::List[System::String].new

Regarding base class properties, there is no "base" keyword in Ruby so you can use "self" or just call the method or property directly. You might also try to mangle the property name (for instance, HelloWorld is mangled to hello_world). I suggest that in order to access the Content propery, just call it this way:

self.content

Hope it helps, Shay.

Shay Friedman