I have an array of Foo objects. How do I remove the second element of the array?
I need something similar to RemoveAt() but for a regular array.
RemoveAt()
Try below code:
myArray = myArray.Where(s => (myArray.IndexOf(s) != indexValue)).ToArray();
or
myArray = myArray.Where(s => (s != "not_this")).ToArray();