List with Item entry's, Put it sorted on a leaderboard

So basically, this is asking for 2 pieces.

1, How do you sort a list, So for example, the first 10, last 10 etc.
I got a list with ItemEntry’s, code is looking like this:

public class ItemEntry
{
    public string playerName;
    public int playerScore;
}

And the list:

public class ItemDatabase
{
    public List<ItemEntry> list = new List<ItemEntry>();

}

This all works fine, with this i can put it in the Debug Log:

    public void Display()
    {
        //Testing purpose if it works
        foreach (ItemEntry item in ins.itemDB.list)
        {
            Debug.Log(item.playerName);
            Debug.Log(item.playerScore);
        }
    }

Anyways, how can you sort this that it sorts the score with item.playerScore, That for example the player with the score 1000, is higher then 100, i think the principal is clear.

Secondly, how would you put this on a leaderboard efficiently, you could do it with referencing, but it is kind of unpractical, for example if i want a top 50 or something, you get the idea. Hope someone can help me!

the sorting is simples u can use linq…

using System.Linq;

and then on your list… do this…

    public List<ItemEntry> list = new List<ItemEntry>();
    public List<ItemEntry> listInOrder = new List<ItemEntry>();        
    
   listInOrder  = list.OrderBy (x => x.playerScore).ToList ();

then u will have the list in order…