user124473 user124473 - 21 days ago 7
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

You should use List

List<int> myList = new List<int>();
Comments