Class EnumerableExtensions
Extension methods for the .Net IEnumerable class
Inheritance
EnumerableExtensions
Assembly: cs.temp.dll.dll
public static class EnumerableExtensions
Methods
Returns the max element based on the provided comparer or the default value when the list is empty
Declaration
public static T MaxOrDefault<T>(this IEnumerable<T> items, IComparer<T> comparer = null)
Parameters
Type |
Name |
Description |
IEnumerable<T> |
items |
|
IComparer<T> |
comparer |
|
Returns
Type |
Description |
T |
Max or default value of T
|
Type Parameters
Returns the max element based on the provided comparer or the default value when the list is empty
Declaration
public static T MaxOrDefault<T>(this IEnumerable<T> items, IComparer<T> comparer = null)
Parameters
Type |
Name |
Description |
IEnumerable<T> |
items |
|
IComparer<T> |
comparer |
|
Returns
Type |
Description |
T |
Max or default value of T
|
Type Parameters