ITextSnapshot.GetLineFromPosition Method
Gets an ITextSnapshotLine for a line at the given position.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
声明
Function GetLineFromPosition ( _
position As Integer _
) As ITextSnapshotLine
ITextSnapshotLine GetLineFromPosition(
int position
)
ITextSnapshotLine^ GetLineFromPosition(
int position
)
abstract GetLineFromPosition :
position:int -> ITextSnapshotLine
function GetLineFromPosition(
position : int
) : ITextSnapshotLine
Parameters
- position
Type: System.Int32
The position.
Return Value
Type: Microsoft.VisualStudio.Text.ITextSnapshotLine
A non-null ITextSnapshotLine.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | position is less than zero or greater than the length of the line. |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.