Share via


SyntaxNodeOrToken.AsToken Method

Definition

Returns the underlying token if this SyntaxNodeOrToken is wrapping a token.

public:
 Microsoft::CodeAnalysis::SyntaxToken AsToken();
public Microsoft.CodeAnalysis.SyntaxToken AsToken ();
member this.AsToken : unit -> Microsoft.CodeAnalysis.SyntaxToken
Public Function AsToken () As SyntaxToken

Returns

The underlying token if this SyntaxNodeOrToken is wrapping a token.

Applies to