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.
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.
First step
You need to convert the array into a list, you could write an extension method like this
Second step
Write an extension method to convert back the list into an array
Last steps
Write your final method, but remember to remove the element at index before converting back to an array like the code show
examples codes could be find on my blog, keep tracking.