Is there any method for creating a dynamic array in C#?
Expanding on Chris and Migol`s answer with a code sample.
Using an array
Student array = new Student; array = new Student("bob"); array = new Student("joe");
Using a generic list. Under the hood the List<T> class uses an array for storage but does so in a fashion that allows it to grow effeciently.
List<Student> list = new List<Student>(); list.Add(new Student("bob")); list.Add(new Student("joe")); Student joe = list;