SkipWhile C# with Example



SkipWhile C# with Example

SkipWhile() is used to exclude elements until first non-match (this might be counter intuitive to most) 
int[] list = { 42, 42, 6, 6, 6, 42 }; 
 

var result = list.SkipWhile(i => i == 42); 
// Result: 6, 6, 6, 42 

0 Comment's

Comment Form

Submit Comment