linq行数问题
- C# code
var temp = from c in menbers select new { id = c.id, companyname = c.companyname };如何获取temp的行数,就有几行数据,新手,见谅!
[解决办法]
temp.Count
[解决办法]
int j=temp.Count();
[解决办法]
temp.Count()
此为IQueryable的扩展方法,详细可查阅MSDN文档。