共用方式為


MethodDeclarationSyntax.WithBody(BlockSyntax) 方法

定義

public:
 Microsoft::CodeAnalysis::CSharp::Syntax::MethodDeclarationSyntax ^ WithBody(Microsoft::CodeAnalysis::CSharp::Syntax::BlockSyntax ^ body);
public Microsoft.CodeAnalysis.CSharp.Syntax.MethodDeclarationSyntax WithBody (Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax body);
public Microsoft.CodeAnalysis.CSharp.Syntax.MethodDeclarationSyntax WithBody (Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax? body);
override this.WithBody : Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax -> Microsoft.CodeAnalysis.CSharp.Syntax.MethodDeclarationSyntax
Public Function WithBody (body As BlockSyntax) As MethodDeclarationSyntax

參數

傳回

適用於