鉴于以下内容......
int maxResults = 25;
string code = "Thailand";
var q = from i in images where i.component_code == code select i;
var images = q.OrderByDescending(x => x.image_rating).Take(maxResults);
if (images.Count() > 0)
{
...
lblResult = string.Format("Viewing {0} Images Of A Possible {1}", images.Count(), ?);
}
如果未使用Take(),我如何获得可能返回的图像总数
答案 0 :(得分:4)
你能不能使用q.Count()吗?