how to add unlimited array or vector without using List? on c# because they Closed my question i am asking again

51 views Asked by At

want to create an add method to add movies without any limitation however I don't want to use List and what i have used in this code is that i have used array and vector but it is limited i don't want it to be limited

I expect it to be added every time I add a movie as many times as the user add movies so please come with advice

i am a student and this is not okay for me to use : dynamic lists (e.g. "List"), which have built-in functions for sorting etc. You should instead only use vectors/arrays for pedagogical purposes

this is what i have used:

class Program { static Movie[] movieArray = new Movie[1000]; static int movieCount = 0;

1

There are 1 answers

4
emuller On

BY using SYstem.LINQ, you can use:

array.Append("value");

This will add the value to the end of your array