SyntaxNode.FindToken(Int32, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Finds a descendant token of this node whose span includes the supplied position.
public Microsoft.CodeAnalysis.SyntaxToken FindToken (int position, bool findInsideTrivia = false);
member this.FindToken : int * bool -> Microsoft.CodeAnalysis.SyntaxToken
Public Function FindToken (position As Integer, Optional findInsideTrivia As Boolean = false) As SyntaxToken
Parameters
- position
- Int32
The character position of the token relative to the beginning of the file.
- findInsideTrivia
- Boolean
True to return tokens that are part of trivia. If false finds the token whose full span (including trivia) includes the position.
Returns
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.