SyntaxFactory.MethodBlock 方法

定义

重载

MethodBlock(SyntaxKind, MethodStatementSyntax, EndBlockStatementSyntax)

表示 Function 或 Sub 块声明:具有开始声明、可执行语句主体和 end 语句的声明。

MethodBlock(SyntaxKind, MethodStatementSyntax, SyntaxList<StatementSyntax>, EndBlockStatementSyntax)

表示 Function 或 Sub 块声明:具有开始声明、可执行语句主体和 end 语句的声明。

MethodBlock(SyntaxKind, MethodStatementSyntax, EndBlockStatementSyntax)

Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb

表示 Function 或 Sub 块声明:具有开始声明、可执行语句主体和 end 语句的声明。

public:
 static Microsoft::CodeAnalysis::VisualBasic::Syntax::MethodBlockSyntax ^ MethodBlock(Microsoft::CodeAnalysis::VisualBasic::SyntaxKind kind, Microsoft::CodeAnalysis::VisualBasic::Syntax::MethodStatementSyntax ^ subOrFunctionStatement, Microsoft::CodeAnalysis::VisualBasic::Syntax::EndBlockStatementSyntax ^ endSubOrFunctionStatement);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodBlockSyntax MethodBlock (Microsoft.CodeAnalysis.VisualBasic.SyntaxKind kind, Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax subOrFunctionStatement, Microsoft.CodeAnalysis.VisualBasic.Syntax.EndBlockStatementSyntax endSubOrFunctionStatement);
static member MethodBlock : Microsoft.CodeAnalysis.VisualBasic.SyntaxKind * Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.EndBlockStatementSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodBlockSyntax
Public Shared Function MethodBlock (kind As SyntaxKind, subOrFunctionStatement As MethodStatementSyntax, endSubOrFunctionStatement As EndBlockStatementSyntax) As MethodBlockSyntax

参数

kind
SyntaxKind

一个 SyntaxKind ,表示 MethodBlockSyntax 的特定类型。 SubBlock 之一,FunctionBlock。

subOrFunctionStatement
MethodStatementSyntax

开始块的“Sub”或“Function”语句。

endSubOrFunctionStatement
EndBlockStatementSyntax

结束块的“End Sub”或“End Function”语句。

返回

适用于

MethodBlock(SyntaxKind, MethodStatementSyntax, SyntaxList<StatementSyntax>, EndBlockStatementSyntax)

Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb

表示 Function 或 Sub 块声明:具有开始声明、可执行语句主体和 end 语句的声明。

public:
 static Microsoft::CodeAnalysis::VisualBasic::Syntax::MethodBlockSyntax ^ MethodBlock(Microsoft::CodeAnalysis::VisualBasic::SyntaxKind kind, Microsoft::CodeAnalysis::VisualBasic::Syntax::MethodStatementSyntax ^ subOrFunctionStatement, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::StatementSyntax ^> statements, Microsoft::CodeAnalysis::VisualBasic::Syntax::EndBlockStatementSyntax ^ endSubOrFunctionStatement);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodBlockSyntax MethodBlock (Microsoft.CodeAnalysis.VisualBasic.SyntaxKind kind, Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax subOrFunctionStatement, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.StatementSyntax> statements, Microsoft.CodeAnalysis.VisualBasic.Syntax.EndBlockStatementSyntax endSubOrFunctionStatement);
static member MethodBlock : Microsoft.CodeAnalysis.VisualBasic.SyntaxKind * Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.StatementSyntax> * Microsoft.CodeAnalysis.VisualBasic.Syntax.EndBlockStatementSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodBlockSyntax
Public Shared Function MethodBlock (kind As SyntaxKind, subOrFunctionStatement As MethodStatementSyntax, statements As SyntaxList(Of StatementSyntax), endSubOrFunctionStatement As EndBlockStatementSyntax) As MethodBlockSyntax

参数

kind
SyntaxKind

一个 SyntaxKind ,表示 MethodBlockSyntax 的特定类型。 SubBlock 之一,FunctionBlock。

subOrFunctionStatement
MethodStatementSyntax

开始块的“Sub”或“Function”语句。

statements
SyntaxList<StatementSyntax>

块语句中包含的语句。 这可能是一个空列表。

endSubOrFunctionStatement
EndBlockStatementSyntax

结束块的“End Sub”或“End Function”语句。

返回

适用于