Click or drag to resize

EnsureIsNullOrBetweenT Method

Ensures that the value of a parameter is null or is between a minimum and a maximum value.

Namespace:  MongoDB.Driver.Core.Misc
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax
public static T? IsNullOrBetween<T>(
	T? value,
	T min,
	T max,
	string paramName
)
where T : struct, new(), IComparable<T>

Parameters

value
Type: SystemNullableT
The value of the parameter.
min
Type: T
The minimum value.
max
Type: T
The maximum value.
paramName
Type: SystemString
The name of the parameter.

Type Parameters

T
Type type of the value.

Return Value

Type: NullableT
The value of the parameter.
See Also