共用方式為


SyntaxFactory.DeclarationExpression 方法

定義

建立新的 DeclarationExpressionSyntax 實例。

public:
 static Microsoft::CodeAnalysis::CSharp::Syntax::DeclarationExpressionSyntax ^ DeclarationExpression(Microsoft::CodeAnalysis::CSharp::Syntax::TypeSyntax ^ type, Microsoft::CodeAnalysis::CSharp::Syntax::VariableDesignationSyntax ^ designation);
public static Microsoft.CodeAnalysis.CSharp.Syntax.DeclarationExpressionSyntax DeclarationExpression (Microsoft.CodeAnalysis.CSharp.Syntax.TypeSyntax type, Microsoft.CodeAnalysis.CSharp.Syntax.VariableDesignationSyntax designation);
static member DeclarationExpression : Microsoft.CodeAnalysis.CSharp.Syntax.TypeSyntax * Microsoft.CodeAnalysis.CSharp.Syntax.VariableDesignationSyntax -> Microsoft.CodeAnalysis.CSharp.Syntax.DeclarationExpressionSyntax
Public Shared Function DeclarationExpression (type As TypeSyntax, designation As VariableDesignationSyntax) As DeclarationExpressionSyntax

參數

type
TypeSyntax

傳回

適用於