ITextRange.InRange(ITextRange) 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.
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
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.