user124473 user124473 - 3 months ago 29
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?


You should use List

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