Skip last element in array and return all other c # elements
4 answers
You can use Enumerable.Take()
for this:
var results = theArray.Take(theArray.Length - 1);
This will allow you to list all the elements except the last one in the array.
0
source to share