Indicates whether the specified UInt16 value is in the specified interval.
Namespace: EgonsoftHU.Extensions.Bcl
Assembly: EgonsoftHU.Extensions.Bcl (in EgonsoftHU.Extensions.Bcl.dll) Version: 3.0.1+8c729d04d0fcab10705485e5626d4fdebeaa818d
C#
public static bool IsInRange(
this ushort value,
ushort lowerBound,
ushort upperBound,
IntervalBoundsOptions options = 0
)
VB
<ExtensionAttribute>
Public Shared Function IsInRange (
value As UShort,
lowerBound As UShort,
upperBound As UShort,
Optional options As IntervalBoundsOptions = 0
) As Boolean
- UInt16
- The value to compare against the lower bound and the upper bound.
- UInt16
- The beginning of the interval.
- UInt16
- The end of the interval.
- IntervalBoundsOptions (Optional)
- Specifies whether to treat the lower and upper bounds as inclusive or exclusive. By default, both are treated as inclusive.
Boolean
true, if value is in the specified interval; otherwise, false.
In Visual Basic and C#, you can call this method as an instance method on any object of type UInt16. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
NumberExtensions Class
IsInRange Overload
EgonsoftHU.Extensions.Bcl Namespace