UtilitiesEnsureInRangeT Method |
Ensures a value is within a specified range.
Namespace: FiddlerAssembly: FiddlerCore4 (in FiddlerCore4.dll) Version: 4.6.2.0
Syntax public static T EnsureInRange<T>(
T current,
T min,
T max
)
Public Shared Function EnsureInRange(Of T) (
current As T,
min As T,
max As T
) As T
public:
generic<typename T>
static T EnsureInRange(
T current,
T min,
T max
)
Parameters
- current
- Type: T
Current value - min
- Type: T
Min value - max
- Type: T
Max value
Type Parameters
- T
- Type of the value
Return Value
Type:
TReturns the provided value, unless it is outside of the specified range, in which case the nearest "fencepost" is returned.
See Also