📜  从字符串数组中删除元素c#代码示例

📅  最后修改于: 2022-03-11 14:48:53.691000             🧑  作者: Mango

代码示例1
string[] array = new string[] { "1", "2", "3", "4", "5", "6", "7" };

List list = new List(array);

//you can sort List!
list.Sort();

list.Remove("4");//remove specieifed item.
list.RemoveAt(2);//remove item from index.
list.RemoveRange(1, 2);//remove a range of items.