The goal for this exercise is to practicing using the List<> class by implementing a solution to a small programming problem.
Note that in order to pass the NUnit tests, each value (each integer) should be printed out on its own line, with nothing else (not even blank spaces) on that line. The values should be printed out in order, so that the smallest value is printed first and the largest value is printed last.
Short version: use List<>, unless you have a good reason not to
Some examples of a good reason:
You need to call a method that returns an array or requires an array as a parameter
Windows.readImageFromFile returns a 2D array
Find other methods?
Lower-level work (OS’s often use arrays – network interfaces, images, etc)
Network response?
Arrays perform better - First write the program with List<>, then switch to array only if you need the perf benefit
You wrote the program using a List<>, and that List<> is the core of your program. You use it a million times a second, and you'd like to increase the performance (increase the 'speed', reduce the time taken to compute, etc) of your program.
Arrays are good when you know you have a fixed-length storage need
read a file - each line has exactly 3 items (x, y, temperature)
Arrays are good for 2D storage (particularly dense/packed storage)
need to store a 2D image in memory
need to store a 2D matrix in memory
need to store a 3D or 4D matrix in memory (still arrays!)
List<> is easier to use, and has more features.
What should you use 'by default'?
What you need to do for this exercise: