public void ArraySample() { _array = Array; Console.WriteLine("Sorting the following list"); Console.WriteLine(ArrayToString(_array.ToArray())); for (int i = 0; i < _array.Count; ++i) { for (int j = i + 1; j < _array.Count; ++j) { if (_array[i] > _array[j]) { int tmp = _array[j]; _array[j] = _array[i]; _array[i] = tmp; } } } Console.WriteLine("The sorted list is"); Console.WriteLine(ArrayToString(_array.ToArray())); Console.ReadLine(); }