IRangeTContains(IRangeT) Method

Returns true if the given range is entirely contained within this range.

Definition

Namespace: InnerDrive.Core
Assembly: InnerDrive.Core (in InnerDrive.Core.dll) Version: 5.2.9017.0
C#
bool Contains(
	IRange<T>? value
)

Parameters

value  IRangeT
The range to compare with this range.

Return Value

Boolean
true if the range is contained within this range.

Remarks

A range contains another range when the second range is entirely within the first range. Adjacent ranges never contain each other, regardless of their IsLowerInclusive or IsUpperInclusive values.
Range ARange BA.Contains(B)?
ABCDEF0ABCDEfalse
ABCDEFBCDEtrue
ABCDEFABCDEtrue
ABCDEFBCDEFtrue
ABCDEFABCDEFtrue
ABCDEFFGHIJfalse

See Also