bAN bAN - 1 year ago 112
C# Question

How can I add to a List's first position?

I just have a List<> and I would like to add an item to this list but at the first position.
List.add() add the item at the last.. How can I do that?..
Thanks for help!

Answer Source
List<T>.Insert(0, item);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download