Source.GetLineIndexOfPosition Method
Gets the line and column for the specified position.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Syntax
'Dichiarazione
Public Sub GetLineIndexOfPosition ( _
position As Integer, _
<OutAttribute> ByRef line As Integer, _
<OutAttribute> ByRef col As Integer _
)
'Utilizzo
Dim instance As Source
Dim position As Integer
Dim line As Integer
Dim col As Integer
instance.GetLineIndexOfPosition(position, _
line, col)
public void GetLineIndexOfPosition(
int position,
out int line,
out int col
)
public:
void GetLineIndexOfPosition(
int position,
[OutAttribute] int% line,
[OutAttribute] int% col
)
member GetLineIndexOfPosition :
position:int *
line:int byref *
col:int byref -> unit
public function GetLineIndexOfPosition(
position : int,
line : int,
col : int
)
Parameters
- position
Type: System.Int32
The position or character offset into the source file.
- line
Type: System.Int32%
[out] Returns the line number corresponding to the position.
- col
Type: System.Int32%
[out] Returns the column number (offset on the line) corresponding to the position.
Remarks
This method forwards the call to the GetLineIndexOfPosition method on the IVsTextLines object passed to the Source class constructor. An exception is thrown if an error occurs.
.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.