How would I get all arguments after the first 3 from a string[]
in C#?
E.g. from [1, 2, 3, 4, 5]
I want [4, 5]
How would I get all arguments after the first 3 from a string[]
in C#?
E.g. from [1, 2, 3, 4, 5]
I want [4, 5]
Making sure you have using System.Linq
, you can use this:
stringArray.Skip(3);
This returns an IEnumerable, which you can traverse. If you need an array, you can just:
stringArray.Skip(3).ToArray();