¿Cómo puedo usar métodos de extensión en Boo
Pregunta
Tengo una lista en mi guión Boo y quiero usar métodos de extensión System.Linq pero Boo compilador arroje este Excepción:
BCE0019: Boo.Lang.Compiler.CompilerError: 'ToList' is not a member of
'System.Linq.IQueryable`1[[...]]'.
( "..." es mi tipo de objeto)
Solución 2
I should import System.Linq.Enumerable not System.Linq
thanks Jean and Matthew for your answers.
Otros consejos
What version of Boo? Extension Methods have been supported since 0.9.0. If you can't use extension methods with the version you are using, you'll have to use absolute method calls, e.g. Enumerable.Select(...).
As @Jean has said, have you also imported System.Linq
?
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow