Thanks!

I'm still a bit surprised that one has to do the conversion explicitly. 
I would expect that either IronRuby uses CLR arrays (and strings) or 
would do the conversion implicitly for me. But as I said in my previous 
mail, I'm new to IronRuby and probably missing a whole bunch of design 
decisions and other relevant information.

Regards, Maurits

Tomas Matousek wrote:
> RubyArrays are not implicitly convertible to CLR arrays.
> 
> You need something like:
> 
> def to_string_vector array
>   list = System::Collections::Generic::List[ClrString].new
>   array.each {|x| list.add(x.to_s.to_clr_string) }
>   list.to_array
> end
> 
> Tomas

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to