LINQ - Comparing Count() to Any()(colinmackay.co.uk)

submitted by dpetersondpeterson(4397) 9 months, 5 days ago

Compares the performance differences and considerations between using Count and Any to determine if any elements in a collection match a filter. A commenter also points out that using Any with an embedded filter gives different performance results as well. While it's important not to prematurely optimize, it is important to consider the points in this article if you write queries like this that run in a tight loop or iterate over large sets of data.

add a comment |category: |Views: 34

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story