template class MAGES::Sorter

Overview

Class for sorting lists of objects by a key. More…

template 
class Sorter
{
public:
    // properties

    Sorter Instance;

    // methods

    void Sort(List list, Func keySelector);
};

Detailed Documentation

Class for sorting lists of objects by a key.

Parameters:

T

The type of the list to be sorted.

Properties

Sorter Instance

Gets the singleton instance of the sorter.

Methods

void Sort(List list, Func keySelector)

Sorts the given list by the given key.

Parameters:

list

The given list to be sorted.

keySelector

The given key to sort the list by.

ArgumentException

Throws an exception if the objects don’t implement IComparable.