class Array<br>        def to_clr_arr<br>        arr = System::Array.CreateInstance self[0].class.to_clr_type, System::Int32.pase(self.length.to_s)<br>        self.each_with_index { |r, i| arr[i] = r }<br>        return arr<br>
    end<br>end<br><br>my_csharp_class_instance.call(%w(some array).map{|x| x.to_clr_string}.to_clr_arr)<br><br><div class="gmail_quote">2009/4/2 Thibaut Barrère <span dir="ltr">&lt;<a href="mailto:thibaut.barrere@gmail.com">thibaut.barrere@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>while trying to call some C# code from IronRuby, I get this:<br><br>my_csharp_class_instance.call(%w(some array))<br>
<br>:0: can&#39;t convert Array into System::String[] (TypeError)<br><br>Is there some easy way to construct an array of System::String ? Or a conversion ?<br>

<br>cheers,<br><font color="#888888"><br>-- Thibaut<br>
</font><br>_______________________________________________<br>
Ironruby-core mailing list<br>
<a href="mailto:Ironruby-core@rubyforge.org">Ironruby-core@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Michael Letterle<br>IronRuby MVP<br><a href="http://blog.prokrams.com">http://blog.prokrams.com</a><br><br><br>