Partilhar via


TextRange.Contains Method

Definition

Overloads

Contains(TextPosition)

Determines whether a given TextPosition lies within the range.

Contains(TextRange)

Determines whether range falls completely within this range.

Contains(Int32)

Determines whether the position lies within the range.

Contains(TextPosition)

Determines whether a given TextPosition lies within the range.

public bool Contains (Microsoft.VisualStudio.Extensibility.Editor.TextPosition position);
member this.Contains : Microsoft.VisualStudio.Extensibility.Editor.TextPosition -> bool
Public Function Contains (position As TextPosition) As Boolean

Parameters

position
TextPosition

The point to check.

Returns

true if the position is greater than or equal to parameter range.Start and strictly less than parameter range.End, otherwise false.

Applies to

Contains(TextRange)

Determines whether range falls completely within this range.

public bool Contains (Microsoft.VisualStudio.Extensibility.Editor.TextRange range);
member this.Contains : Microsoft.VisualStudio.Extensibility.Editor.TextRange -> bool
Public Function Contains (range As TextRange) As Boolean

Parameters

range
TextRange

The range to check.

Returns

true if the specified range falls completely within this range, otherwise false.

Applies to

Contains(Int32)

Determines whether the position lies within the range.

public bool Contains (int position);
member this.Contains : int -> bool
Public Function Contains (position As Integer) As Boolean

Parameters

position
Int32

The position to check.

Returns

true if the position is greater than or equal to parameter range.Start and strictly less than parameter range.End, otherwise false.

Applies to