Assert.IsInRange<T>(T, T, T, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Tests whether the specified value is within the expected range (inclusive). The range includes both the minimum and maximum values.
public static void IsInRange<T>(T minValue, T maxValue, T value, string message = "") where T : struct;
static member IsInRange : 'T * 'T * 'T * string -> unit (requires 'T : struct)
Public Shared Sub IsInRange(Of T As Structure) (minValue As T, maxValue As T, value As T, Optional message As String = "")
Type Parameters
- T
The type of the values to compare.
Parameters
- minValue
- T
The minimum value of the expected range (inclusive).
- maxValue
- T
The maximum value of the expected range (inclusive).
- value
- T
The value to test.
- message
- String
The message format to display when the assertion fails.