Table of Contents

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 T

First value.

b T

Second value.

Returns

T

The maximum value of a and b.

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 T

First value.

b T

Second value.

Returns

T

The minimum value of a and b.

Type Parameters

T

Type implementing IComparable<T>.