|
@@ -2728,6 +2728,12 @@ namespace InABox.Core
|
|
|
return new Queue<T>(enumerable.ToArray());
|
|
|
}
|
|
|
|
|
|
+ public static void SortBy<T, TProp>(this List<T> list, Func<T, TProp> comparison)
|
|
|
+ where TProp : IComparable
|
|
|
+ {
|
|
|
+ list.Sort((a, b) => comparison(a).CompareTo(comparison(b)));
|
|
|
+ }
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
}
|