SyntaxFactory.StringLiteralExpression(SyntaxToken) 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.
Represents a literal. The kind of literal is determined by the Kind property: IntegerLiteral, CharacterLiteral, BooleanLiteral, DecimalLiteral, FloatingLiteral, DateLiteral or StringLiteral. The value of the literal can be determined by casting the associated Token to the correct type and getting the value from the token.
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::LiteralExpressionSyntax ^ StringLiteralExpression(Microsoft::CodeAnalysis::SyntaxToken token);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax StringLiteralExpression (Microsoft.CodeAnalysis.SyntaxToken token);
static member StringLiteralExpression : Microsoft.CodeAnalysis.SyntaxToken -> Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax
Public Shared Function StringLiteralExpression (token As SyntaxToken) As LiteralExpressionSyntax
Parameters
- token
- SyntaxToken
The token that represents the literal. The Kind property determines what type this property returns: Kind=IntegerLiteral ==> Returns IntegerLiteralToken. Kind=CharacterLiteral ==> Returns CharacterLiteralToken. Kind=DecimalLiteral ==> Returns DecimalLiteralToken Kind=FloatingLiteral ==> Returns FloatingLiteralToken Kind=DateLiteral ==> Returns DateLiteralToken Kind=StringLiteral ==> Returns StringLiteralToken Kind=BooleanLiteral ==> Returns Keyword (with it's kind being TrueKeyword or FalseKeyword) Kind=NothingLiteral ==> Returns Keyword (with it's kind being NothingKeyword)
Returns
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈