我需要为 C# where 扩展方法包含哪个程序集?
Where
扩展方法必须包含的程序集的名称是什么?我在谷歌上找不到它的名字,显然它不是其中之一:
using System;
using System.Collections.Specialized;
using System.Linq.Expressions;
using System.Collections;
using System.Collections.Generic;
What is the name of the assembly that must be included for the Where
extension method? I can't find it's name on google, and apparently it's not one of these:
using System;
using System.Collections.Specialized;
using System.Linq.Expressions;
using System.Collections;
using System.Collections.Generic;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要...
System.Core
程序集的引用添加到您的项目中;并using System.Linq
指令。请注意,
using
指令不会将程序集导入到您的项目中,它仅从指定的命名空间导入符号。为了使命名空间可用,必须首先引用在该命名空间中定义类型的程序集。如果您使用的是 Microsoft Visual Studio 并且想要向项目添加程序集引用,请打开“项目资源管理器”面板,右键单击您的项目,然后转到“属性” > 或添加参考...。
You need to...
System.Core
assembly to your project; andusing System.Linq
directive at the start of your source file(s).Please note that a
using
directive does not import an assembly into your project, it only imports symbols from a specified namespace. In order for a namespace to become available, you must first reference an assembly that defines types in that namespace.If you're using Microsoft Visual Studio and you want to add an assembly reference to your project, open the Project Explorer panel, right-click on your project and go either to Properties or Add reference....
应该做。
Should do it.