Trying to get all elements after first match using linq
Posted
by MatteS
on Stack Overflow
See other posts from Stack Overflow
or by MatteS
Published on 2010-03-11T20:50:20Z
Indexed on
2010/03/11
20:54 UTC
Read the original article
Hit count: 198
How do I retrieve all elements after the first one starting with a "-" using linq?
var arr = new[] {"-s1", "-s2", "va", "-s3", "va2", "va3"}; var allElementsAfterVA = from a in arr where ???? select a;
I want allElementsAfterVA to be "-s3", "va2", "va3"
© Stack Overflow or respective owner