List<int> list = new List<int>() { 99, 86, 87, 100, 101, 104 }; int index = list.IndexOf(87); while (index >= 0 && index < list.Count) { list.RemoveAt(index); }
List<int> intList = new List<int>{99,86,87,100,101,104}; intList.RemoveRange(intList.IndexOf(87),4);
//create list List<int> data = new List<int>(); for (int i = 0; i < 100; i++) { data.Add(i); } //remove elements that are greater than 90 for(int x = 99; x >= 0; x--) { if(data[x] > 90) { int c = data[x]; data.Remove(c); } } </int></int>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)