how to take all array elements except last element in C#

后端 未结 6 838
滥情空心
滥情空心 2020-12-14 14:50

I have a string array like this.

string[] queries with data more than one string.

I want to skip the last string from the element and take the r

6条回答
  •  没有蜡笔的小新
    2020-12-14 15:02

    This answer from a related post is also worth mentioning as it elegantly applies to any IEnumerable in a single pass, without the need to know its number of elements beforehand.

提交回复
热议问题