robintw robintw - 1 year ago 162
C# Question

Pop off array in C#

I've got a string array in C# and I want to pop the top element off the array (ie. remove the first element, and move all the others up one). Is there a simple way to do this in C#? I can't find an Array.Pop method.

Would I need to use something like an ArrayList? The order of the items in my array is important.

Answer Source

Use a List, Queue or Stack instead..

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download