using System.Collections.Generic;
public static void Main()
Console.WriteLine("Sorting Algorithm.......\n");
var list = new List<string>()
"Blue Light Blocking Glasses,90,16",
"Disinfecting Wipes,37,12",
"Jenga Classic Game,100,7",
var sortedProducts = list.Select(line => new
SortKey = Int32.Parse(line.Split(',')[1]),
SortKeyThenBy = Int32.Parse(line.Split(',')[2]),
).OrderByDescending(x => x.SortKey).ThenBy(x => x.SortKeyThenBy).Select(x => x.Line);
foreach (var tempSortedProducts in sortedProducts)
Console.WriteLine(tempSortedProducts);
Console.WriteLine("\nEnd of Sorting Algorithm.......");