user124473 user124473 - 1 year ago 89
C# Question

Infinitely adding to an array

Is there a way of infinitely adding to an array? So far I know I have to initialize and declare my array

int myarray = new array[10];

What if I dont know how many items are going to go into the array and would want to give the user option?

Answer Source

You should use List

List<int> myList = new List<int>();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download