I initially had this code, which, as I mistakenly thought, would do what I wanted:
string firstArg = args[0];
string[] otherArgs = args.Except(new string[] { args[0] }).ToArray();
However, the .Except method seems to remove duplicates. Therefore, if I were to go through the arguments a b c c, the result otherArgswould be b cnot b c c.
So how can I get a new array with all the elements of the second element?
source
share