[Ironruby-core] Linq etc.

John Messerly jomes at microsoft.com
Mon Jan 21 17:19:35 EST 2008


Ivan Porto Carrero:

> What are the plans regarding Linq support for IronRuby. In the
> presentations I've seen you were using vbx to perform linq stuff in
> Silverlight. Is that only applicable to the from .. where ... select
> syntax and we can still use the extension method syntax
> collection.where ?

Yup, you'll be able to use Linq methods using the normal method call syntax. There won't be special syntax.

Translating this example: http://msdn2.microsoft.com/en-us/library/bb397947.aspx, it will look something like this:

require 'System.Core'
numbers = [5, 10, 8, 3, 6, 12]
numbers.where { |num| num % 2 == 0 }.order_by { |n| n }.each { |i| write("#{i} ") }

- John



More information about the Ironruby-core mailing list