0

Not a problem, just a curiosity.

Which is tidier according to you, use an array list and sort through it? Or an array with if statement to store and sort the values?

The sorting is for if user enters 32541 and i want them sorted out as 12345.

pappbence96
  • 1,164
  • 2
  • 12
  • 20
Mark Bonello
  • 29
  • 1
  • 5

2 Answers2

0

Sorting values from an array will always be faster than a List .

Please refer to this post : Performance of Arrays vs. Lists

taktak
  • 90
  • 10
0

If the number of elements is going to change use a List, if it is fixed use an Array.

That's all you have to think about.

Marco Salerno
  • 5,131
  • 2
  • 12
  • 32