Gets information about the token at the specified position.
Namespace: Microsoft.VisualStudio.Package
Assembly: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Syntax
'宣言
Public Overridable Function GetTokenInfo ( _
line As Integer, _
col As Integer _
) As TokenInfo
'使用
Dim instance As Source
Dim line As Integer
Dim col As Integer
Dim returnValue As TokenInfo
returnValue = instance.GetTokenInfo(line, _
col)
public virtual TokenInfo GetTokenInfo(
int line,
int col
)
public:
virtual TokenInfo^ GetTokenInfo(
int line,
int col
)
public function GetTokenInfo(
line : int,
col : int
) : TokenInfo
Parameters
line
Type: System.Int32The number of the line containing the token to examine.
col
Type: System.Int32The character offset in the line to the token to examine.
Return Value
Type: Microsoft.VisualStudio.Package.TokenInfo
A TokenInfo object containing information about the current token.
Remarks
This method calls the colorizer's GetLineInfo method to tokenize the current line, and then calls
GetTokenInfoto get the token information at the character position on the line.
警告
This method requires a valid Colorizer object and associated IScanner object to be passed to the Source class constructor.
Permissions
- 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.