Chosen One
Chosen One
CC#
Created by Yukonヌ on 11/22/2024 in #help
I have a list of students and their grades that I want to sort based on grades
you can use linq query List<string> sortedList = students .OrderBy(i => i.Grade == "A+") .ThenBy(i => i.Grade == "A") .ThenBy(i => i.Grade == "B") .ToList();
12 replies