Given the following...
int maxResults = 25;
string code = "Thailand";
var q = fro开发者_StackOverflow社区m 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(), ?);
}
How do I get the potential total number of images that would have been returned if Take() had not been used
Can't you use q.Count() for this?
精彩评论