Table of Contents

Class Bounds

Namespace
LfrlAnvil
Assembly
LfrlAnvil.Core.dll

Creates instances of Bounds<T> type.

public static class Bounds
Inheritance
Bounds
Inherited Members

Methods

Create<T>(T, T)

Creates a new Bounds<T> instance.

[Pure]
public static Bounds<T> Create<T>(T min, T max) where T : IComparable<T>

Parameters

min T

Minimum value.

max T

Maximum value.

Returns

Bounds<T>

New Bounds<T> instance.

Type Parameters

T

Value type.

Exceptions

ArgumentException

When min is greater than max.

GetUnderlyingType(Type?)

Attempts to extract the underlying type from the provided Bounds<T>type.

[Pure]
public static Type? GetUnderlyingType(Type? type)

Parameters

type Type

Type to extract the underlying type from.

Returns

Type

Underlying Bounds<T> type or null when the provided type is not related to the Bounds<T> type.