using System.Collections.Generic;
public static void Main()
var FruitTypes = new List<Fruit> {
new Fruit { Id = 1, Name = "Banana"},
new Fruit { Id = 2, Name = "Apple" },
new Fruit { Id = 3, Name = "Orange" },
new Fruit { Id = 4, Name = "Plum"},
new Fruit { Id = 5, Name = "Pear" },
List<int> SortValues = new List<int> { 5, 4, 3, 1, 2 };
List<Fruit> result = new List<Fruit>();
foreach (var element in SortValues)
Fruit f = FruitTypes.FirstOrDefault(fruitElement => fruitElement.Id == element);
foreach (var item in result)
Console.WriteLine(item.Id + "\t" + item.Name);
public int Id { get; set; }
public string Name { get; set; }