积极答复者
linq查询返回的是什么数据?

问题
答案
-
你好,
你可以看下隐式类型的局部变量(C# 编程指南)作为参考:
// expr is compiled as IEnumerable<Customer>
// or perhaps IQueryable<Customer>
var expr = from c in customers where c.City == "London" select c;
http://msdn.microsoft.com/zh-cn/library/bb384061.aspx
下面的链接可以帮助你在这个问题上:
LINQ 查询介绍http://msdn.microsoft.com/zh-cn/library/bb397906.aspx
元素操作http://msdn.microsoft.com/zh-cn/library/bb546140.aspx
对数据进行排序http://msdn.microsoft.com/zh-cn/library/bb546145.aspx
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- 已标记为答案 韦恩卑鄙 waywaModerator 2009年6月23日 6:40
-
你可以用foreach来获得alSearch里面的某个数据的id,或者通过索引好像也可以。。foreach(var one in allSearch){//outputstring id = one.id;}我不知道你具体是不是这样写,但是是一个思路。。
我的博客,最近新写了一个Windows Mobile 6.5 Widget开发的文章,欢迎捧场
尽力回答每一个问题,但不代表一定正确,希望初学者能够多自己尝试。。共勉。。:)- 已标记为答案 韦恩卑鄙 waywaModerator 2009年6月23日 6:40
-
tolist 就可以排序了 索引的话可以考虑用dictionory 建立针对字段的字典
紫柔版主的头像真叫萌得一个不行啊。。。。
答案800 撒花- 已标记为答案 韦恩卑鄙 waywaModerator 2009年6月23日 6:40
全部回复
-
你好,
你可以看下隐式类型的局部变量(C# 编程指南)作为参考:
// expr is compiled as IEnumerable<Customer>
// or perhaps IQueryable<Customer>
var expr = from c in customers where c.City == "London" select c;
http://msdn.microsoft.com/zh-cn/library/bb384061.aspx
下面的链接可以帮助你在这个问题上:
LINQ 查询介绍http://msdn.microsoft.com/zh-cn/library/bb397906.aspx
元素操作http://msdn.microsoft.com/zh-cn/library/bb546140.aspx
对数据进行排序http://msdn.microsoft.com/zh-cn/library/bb546145.aspx
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- 已标记为答案 韦恩卑鄙 waywaModerator 2009年6月23日 6:40
-
你可以用foreach来获得alSearch里面的某个数据的id,或者通过索引好像也可以。。foreach(var one in allSearch){//outputstring id = one.id;}我不知道你具体是不是这样写,但是是一个思路。。
我的博客,最近新写了一个Windows Mobile 6.5 Widget开发的文章,欢迎捧场
尽力回答每一个问题,但不代表一定正确,希望初学者能够多自己尝试。。共勉。。:)- 已标记为答案 韦恩卑鄙 waywaModerator 2009年6月23日 6:40
-
tolist 就可以排序了 索引的话可以考虑用dictionory 建立针对字段的字典
紫柔版主的头像真叫萌得一个不行啊。。。。
答案800 撒花- 已标记为答案 韦恩卑鄙 waywaModerator 2009年6月23日 6:40