我如何在boo中使用扩展方法 [英] How can i use Extension Methods in boo
本文介绍了我如何在boo中使用扩展方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的boo脚本中有一个列表,想使用System.Linq扩展方法,但是boo编译器抛出此异常:
I have a list in my boo script and want to use System.Linq Extension Methods but boo compiler throw this Exception:
BCE0019: Boo.Lang.Compiler.CompilerError: 'ToList' is not a member of
'System.Linq.IQueryable`1[[...]]'.
("..."是我的对象的类型)
("..." is type of my object)
推荐答案
我应该导入System.Linq.Enumerable而不是System.Linq
I should import System.Linq.Enumerable not System.Linq
感谢让和马修的回答.
这篇关于我如何在boo中使用扩展方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文