Class ComparableTools
- Namespace
- Plugin.BaseTypeExtensions
- Assembly
- Plugin.BaseTypeExtensions.dll
Provides helper methods for working with types implementing IComparable<T>.
public static class ComparableTools
- Inheritance
-
ComparableTools
- Inherited Members
Methods
Max<T>(T, T)
Returns the maximum of two values implementing IComparable<T>.
public static T Max<T>(T a, T b) where T : IComparable<T>
Parameters
a
TFirst value.
b
TSecond value.
Returns
- T
The maximum value of
a
andb
.
Type Parameters
T
Type implementing IComparable<T>.
Min<T>(T, T)
Returns the minimum of two values implementing IComparable<T>.
public static T Min<T>(T a, T b) where T : IComparable<T>
Parameters
a
TFirst value.
b
TSecond value.
Returns
- T
The minimum value of
a
andb
.
Type Parameters
T
Type implementing IComparable<T>.