ITextSnapshot.GetLineNumberFromPosition Method
Gets the number of the line that contains the character at the specified position.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Dichiarazione
Function GetLineNumberFromPosition ( _
position As Integer _
) As Integer
int GetLineNumberFromPosition(
int position
)
int GetLineNumberFromPosition(
int position
)
abstract GetLineNumberFromPosition :
position:int -> int
function GetLineNumberFromPosition(
position : int
) : int
Parameters
- position
Type: System.Int32
The position from which to get the line number.
Return Value
Type: System.Int32
The line number of the line in which position lies.
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.