One way would be to do something like this
System::String.trim "a string".to_clr_string.to_char_array
just about every class collection class in .NET allows you to initialize it
with an IEnumerable of some sort so you can just use that constructor with a
ruby array of objects
---
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)
On Fri, Jun 12, 2009 at 9:28 AM, Shay Friedman <lists at ruby-forum.com>
wrote:
> Hi,
>
> I''d like to create a .Net array of a certain type inside IronRuby.
It''s
> needed, for example, for the overloads method.
> For instance, try to retrieve the String.Trim(Char[]) method overload
> from IronRuby... how do you achieve that?
>
> Many thanks,
> Shay.
> ----------------------------
> Shay Friedman
> http://www.ironshay.com
> Follow me: http://twitter.com/ironshay
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/ironruby-core/attachments/20090612/cf4acb85/attachment.html>