SyntaxFactory.MethodBlock 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.
Overloads
MethodBlock(SyntaxKind, MethodStatementSyntax, EndBlockStatementSyntax) |
Represents a Function or Sub block declaration: A declaration that has a beginning declaration, a body of executable statements and an end statement. |
MethodBlock(SyntaxKind, MethodStatementSyntax, SyntaxList<StatementSyntax>, EndBlockStatementSyntax) |
Represents a Function or Sub block declaration: A declaration that has a beginning declaration, a body of executable statements and an end statement. |
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
- Source:
- Syntax.xml.Main.Generated.vb
Represents a Function or Sub block declaration: A declaration that has a beginning declaration, a body of executable statements and an end statement.
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
Parameters
- kind
- SyntaxKind
A SyntaxKind representing the specific kind of MethodBlockSyntax. One of SubBlock, FunctionBlock.
- subOrFunctionStatement
- MethodStatementSyntax
The "Sub" or "Function" statement that begins the block.
- endSubOrFunctionStatement
- EndBlockStatementSyntax
The "End Sub" or "End Function" statement that ends the block.
Returns
Applies to
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
- Source:
- Syntax.xml.Main.Generated.vb
Represents a Function or Sub block declaration: A declaration that has a beginning declaration, a body of executable statements and an end statement.
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
Parameters
- kind
- SyntaxKind
A SyntaxKind representing the specific kind of MethodBlockSyntax. One of SubBlock, FunctionBlock.
- subOrFunctionStatement
- MethodStatementSyntax
The "Sub" or "Function" statement that begins the block.
- statements
- SyntaxList<StatementSyntax>
The statements contained in the block statement. This might be an empty list.
- endSubOrFunctionStatement
- EndBlockStatementSyntax
The "End Sub" or "End Function" statement that ends the block.