Let\'s say I have a List of Songs.
Song {
public string Name = \"\";
public int PlayOrder = 0;
}
Now I want to sort them first
If you only have one preferred way of sorting your Song class, you should implement IComparable and/or IComparable:
List songs = GetSongs();
songs.Sort(); // Sorts the current list with the Comparable logic
If you have multiple ways how you want to store your list, IEqualityComparer is the interface you would like to implement. Then you can provide that comparer as argument in List.