I want to remove some items from an ArrayList. Can I do that using a foreach(…)- loop an IEnumerator like this.
foreach(string s in arraylist)
{
if (s == “del”)
{
// Here I want to remove the item from arraylist…
}
}
Any ideas how to solve this without creating a new ArrayList and add items I want to save. Feels like that solution will bee to time consuming…
All tips are welcomed!.
foreach(string s in arraylist)
{
if (s == “del”)
{
// Here I want to remove the item from arraylist…
}
}
Any ideas how to solve this without creating a new ArrayList and add items I want to save. Feels like that solution will bee to time consuming…
All tips are welcomed!.