I want to delete an item from an array. I thought that it is simple but it is not.
Say
[2 1 9 4 6 56 4 90 3 4] int index = Array.IndexOf(array,x); // to delete x from array List<string> remain = new List<string>(); remain = array.ToList(); remain.RemoveAt(index);//remove an element
The question is that if I decide to delete "4", there are more "4" in the array. I want more results. We don't know how many "4" are duplicate but I want all.
The above code is only return the first one.