使用System.Linq的错误C# [英] C# using System.Linq error

查看:354
本文介绍了使用System.Linq的错误C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么会使用System.Linq的会导致以下错误?




中的类型或命名空间名称Linq的'做
在命名空间系统



解决方案

参考系统不存在。核心



再有其他人的太合并该命名空间 - 但这是主之一的上的.Net 3.5及以上< 。/ EM>



如果你的项目是目前的.Net 2.0,再说了,你用VS的正确版本(2005年及以上) - 你可以在proejct性能只需右键单击;并更改目标框架版本'到3.5。 System.Core程序然后就可以使用了。



如果你没有看到,在选项 - 那么我想您正在使用的旧VS


Why might "using System.Linq" cause the following error?

The type or namespace name 'Linq' does not exist in the namespace 'System'

解决方案

Reference System.Core

And then there are others that merge this namespace too - but that's the primary one on .Net 3.5 and above.

If you're project is currently .Net 2.0, say, and you're using the right version of VS (2005 and above) - you can simply right-click on the proejct properties; and change the 'Target Framework Version' to 3.5. System.Core will then become available.

If you don't see that in the options - then I guess you're using an older VS

这篇关于使用System.Linq的错误C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆