我有以下的代码,但是我不知道如何获取变量TypeSyntax
。
有什么想法吗?
Syntax.LocalDeclarationStatement(
declaration: Syntax.VariableDeclaration(
type: Syntax.PredefinedType(Syntax.Token(SyntaxKind.VarKeyword)),
variables: Syntax.SeparatedList(
Syntax.VariableDeclarator(
identifier: Syntax.Identifier(name)))
)
)
);
这会导致参数异常,提示为:"keyword"