Partager via


Source.GetTokenInfo(Int32, Int32) Method

Definition

Gets information about the token at the specified position.

public:
 virtual Microsoft::VisualStudio::Package::TokenInfo ^ GetTokenInfo(int line, int col);
 virtual Microsoft::VisualStudio::Package::TokenInfo GetTokenInfo(int line, int col);
public virtual Microsoft.VisualStudio.Package.TokenInfo GetTokenInfo (int line, int col);
abstract member GetTokenInfo : int * int -> Microsoft.VisualStudio.Package.TokenInfo
override this.GetTokenInfo : int * int -> Microsoft.VisualStudio.Package.TokenInfo
Public Overridable Function GetTokenInfo (line As Integer, col As Integer) As TokenInfo

Parameters

line
Int32

The number of the line containing the token to examine.

col
Int32

The character offset in the line to the token to examine.

Returns

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.

Warning

This method requires a valid Colorizer object and associated IScanner object to be passed to the Source class constructor.

Applies to