Saturday August 1st

Friday July 31st

Thursday July 30th

Wednesday July 29th

3 Kicks

Difference between SkipWhile and Where in linq

Before some time I have written a blog post about the SkipWhile operator and a reader of my blog asked me that we can do the same thing with Where also but there is a difference between this two. So In this post I am going to explain you difference between those two. Where operator filters a list of collection based on condition. It will filter whole collection while SkipWhile will only skip those elements in list until condition is true and after that it will stop filtering of skipping. Now let’s take an example where we can see the difference between Where and SkipWhile. Following is a code for that.

1 comments

I thought the same thing when I read your first post, thanks for clearing it up. :-)

Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network