1.

What is the difference between SkipWhile() and Skip() methods in LINQ?

Answer»
Skip()SkipWhile()
Used to specify the amount (number) of ITEMS to skip in a LINQ expression.Used to supply a predicate function on how many numbers to skip.
It will take an integer argument and then simply skips those n numbers from the top of the given IEnumerableIt works on a per-line BASIS. It shall continue to skip if the VALUE returned from the function is true.
Syntax: yourlist.Skip(5)Syntax: yourList.SkipWhile(x => x.marks < 50)


Discussion

No Comment Found