using System.Collections.Generic;
namespace ConsoleApplication1
public static void Main()
var collection = Enumerable
.Select(_ => new Item(rnd.Next(30)))
var filteredCollection = collection.MaxByRange(x => x.Prop);
foreach (var item in filteredCollection)
Console.WriteLine(item.Prop);
public int Prop { get; set; }
public static class EnumerableExtensions
public static List<T> MaxByRange<T, TR>(this IEnumerable<T> source, Func<T, TR> selector) where TR : IComparable<TR>
var result = new List<T>();
foreach (var item in source)
if (selector(item).CompareTo(max) > 0)
else if (selector(item).CompareTo(max) == 0)