无法使用system.data.datasetextensions [英] Unable to Using system.data.datasetextensions
本文介绍了无法使用system.data.datasetextensions的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试通过LINQ查询数据表,我的代码如下-在google上阅读后.
I am trying to query a datatable via LINQ and my code is as follows - after reading on the google.
var result = from c in ods.Tables[0].AsEnumerable()
select new { c.Field<string> ("name")};
我的问题是,我需要导入
My problem is, i needs to import
system.data.datasetextensions
才能使此代码正常工作,我能够添加对此dll的引用.
但是当我使用System.Data时,我没有得到datasetextensions命名空间选项.
请帮我...学习
for this code to work, I was able to add the reference to this dll.
But when i do using System.Data, i do not get the datasetextensions name space options.
Kindly help me...am learning
推荐答案
您需要同时添加dll引用,并放入:Using System.Data;在您的项目中.
您正在使用.NET 3.5或更高版本...对吗?
You need to have both the dll reference added, and to put: Using System.Data; in your project.
You are using .NET 3.5 or later ... right ?
尝试按照此MSDN文章中的说明进行操作 ^ ].
Try following the instruction in this MSDN article How to: Create a LINQ to DataSet Project In Visual Studio[^].
这篇关于无法使用system.data.datasetextensions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文