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
aTFirst value.
bTSecond value.
Returns
- T
The maximum value of
aandb.
Type Parameters
TType 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
aTFirst value.
bTSecond value.
Returns
- T
The minimum value of
aandb.
Type Parameters
TType implementing IComparable<T>.