How do I retrieve all elements after the first one not 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"
To find all of the arguments after the first that does NOT start with “-“, you can do:
This finds “va”, then skips it via Skip(1). The rest of the arguments will be returned.