Delen via


ITextRange.InRange(ITextRange) Method

Definition

Determines whether this range is in or at the same text as a specified range.

public:
 bool InRange(ITextRange ^ range);
bool InRange(ITextRange const& range);
public bool InRange(ITextRange range);
function inRange(range)
Public Function InRange (range As ITextRange) As Boolean

Parameters

range
ITextRange

Text that is compared to the current range.

Returns

Boolean

bool

The comparison result. The result can be null. The method returns True if the range is in or at the same text as ITextRange; otherwise it returns False.

Remarks

For one range (range2) to be contained in another (range1), both ranges must be in the same story, and:

  • Both ranges must be degenerate and have identical insertion points, or
  • Range2 must be a nondegenerate range with start and end positions at or within those of the range1.

When the ITextRange.FindText method is used, you can use one range to walk another by specifying the appropriate limit count of characters.

Applies to

See also