C#/LINQ List.OrderByDescending is sorting in to ascending order
17:49 04 Nov 2025

I have a List of int and am calling OrderByDescending(x => x).ToList(); but the list returned is in ascending order.

What stupid mistake did I make?

Image of code

the scores object is defined as

public class HighScoreData
{
    public List HighScores;
    public int NewestHighScore;
}

the value added on line 30 is 267, which is the correct place but the whole list is in the wrong order.

I am expecting

[0] - 500
[1] - 400
[2] - 300
[3] - 267
[4] - 200
[5] - 100
c# linq