SyntaxFactory.SubStatement Method

Definition

Overloads

SubStatement(SyntaxToken)

The statement that declares a Sub or Function. If this method has a body, this statement will be the Begin of a BlockStatement with Kind=MethodDeclarationBlock, and the body of the method will be the Body of that BlockStatement.

SubStatement(String)

The statement that declares a Sub or Function. If this method has a body, this statement will be the Begin of a BlockStatement with Kind=MethodDeclarationBlock, and the body of the method will be the Body of that BlockStatement.

SubStatement(SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, TypeParameterListSyntax, ParameterListSyntax, SimpleAsClauseSyntax, HandlesClauseSyntax, ImplementsClauseSyntax)

The statement that declares a Sub or Function. If this method has a body, this statement will be the Begin of a BlockStatement with Kind=MethodDeclarationBlock, and the body of the method will be the Body of that BlockStatement.

SubStatement(SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, SyntaxToken, TypeParameterListSyntax, ParameterListSyntax, SimpleAsClauseSyntax, HandlesClauseSyntax, ImplementsClauseSyntax)

The statement that declares a Sub or Function. If this method has a body, this statement will be the Begin of a BlockStatement with Kind=MethodDeclarationBlock, and the body of the method will be the Body of that BlockStatement.

SubStatement(SyntaxToken)

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

The statement that declares a Sub or Function. If this method has a body, this statement will be the Begin of a BlockStatement with Kind=MethodDeclarationBlock, and the body of the method will be the Body of that BlockStatement.

public:
 static Microsoft::CodeAnalysis::VisualBasic::Syntax::MethodStatementSyntax ^ SubStatement(Microsoft::CodeAnalysis::SyntaxToken identifier);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax SubStatement (Microsoft.CodeAnalysis.SyntaxToken identifier);
static member SubStatement : Microsoft.CodeAnalysis.SyntaxToken -> Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax
Public Shared Function SubStatement (identifier As SyntaxToken) As MethodStatementSyntax

Parameters

identifier
SyntaxToken

The name of the method being declared.

Returns

Applies to

SubStatement(String)

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

The statement that declares a Sub or Function. If this method has a body, this statement will be the Begin of a BlockStatement with Kind=MethodDeclarationBlock, and the body of the method will be the Body of that BlockStatement.

public:
 static Microsoft::CodeAnalysis::VisualBasic::Syntax::MethodStatementSyntax ^ SubStatement(System::String ^ identifier);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax SubStatement (string identifier);
static member SubStatement : string -> Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax
Public Shared Function SubStatement (identifier As String) As MethodStatementSyntax

Parameters

identifier
String

The name of the method being declared.

Returns

Applies to

SubStatement(SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, TypeParameterListSyntax, ParameterListSyntax, SimpleAsClauseSyntax, HandlesClauseSyntax, ImplementsClauseSyntax)

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

The statement that declares a Sub or Function. If this method has a body, this statement will be the Begin of a BlockStatement with Kind=MethodDeclarationBlock, and the body of the method will be the Body of that BlockStatement.

public:
 static Microsoft::CodeAnalysis::VisualBasic::Syntax::MethodStatementSyntax ^ SubStatement(Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::AttributeListSyntax ^> attributeLists, Microsoft::CodeAnalysis::SyntaxTokenList modifiers, Microsoft::CodeAnalysis::SyntaxToken identifier, Microsoft::CodeAnalysis::VisualBasic::Syntax::TypeParameterListSyntax ^ typeParameterList, Microsoft::CodeAnalysis::VisualBasic::Syntax::ParameterListSyntax ^ parameterList, Microsoft::CodeAnalysis::VisualBasic::Syntax::SimpleAsClauseSyntax ^ asClause, Microsoft::CodeAnalysis::VisualBasic::Syntax::HandlesClauseSyntax ^ handlesClause, Microsoft::CodeAnalysis::VisualBasic::Syntax::ImplementsClauseSyntax ^ implementsClause);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax SubStatement (Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.VisualBasic.Syntax.TypeParameterListSyntax typeParameterList, Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax parameterList, Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax asClause, Microsoft.CodeAnalysis.VisualBasic.Syntax.HandlesClauseSyntax handlesClause, Microsoft.CodeAnalysis.VisualBasic.Syntax.ImplementsClauseSyntax implementsClause);
static member SubStatement : Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.TypeParameterListSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.HandlesClauseSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ImplementsClauseSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax
Public Shared Function SubStatement (attributeLists As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax, handlesClause As HandlesClauseSyntax, implementsClause As ImplementsClauseSyntax) As MethodStatementSyntax

Parameters

attributeLists
SyntaxList<AttributeListSyntax>

A list of all attribute lists on this declaration. If no attributes were specified, Nothing is returned.

modifiers
SyntaxTokenList

A list of all the modifier tokens that were present on this declaration. If no modifiers were specified, an empty list is returned. A bitfield version of all the modifiers ORed together, which is in many cases easier to use, can be obtained with the Modifiers property.

identifier
SyntaxToken

The name of the method being declared.

typeParameterList
TypeParameterListSyntax

If present, a type parameter list with generic type parameters for this method. If no generic type parameters were present, Nothing is returned.

parameterList
ParameterListSyntax

The method's parameter list including the parentheses. If no parameter list was present, Nothing is returned.

asClause
SimpleAsClauseSyntax

The "As" clause that describes the return type. If no As clause was present, Nothing is returned.

handlesClause
HandlesClauseSyntax

If present, a Handles clause indicated the events that this method handles.

implementsClause
ImplementsClauseSyntax

If present, an Implements clause indicated the interface methods that this method implements.

Returns

Applies to

SubStatement(SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, SyntaxToken, TypeParameterListSyntax, ParameterListSyntax, SimpleAsClauseSyntax, HandlesClauseSyntax, ImplementsClauseSyntax)

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

The statement that declares a Sub or Function. If this method has a body, this statement will be the Begin of a BlockStatement with Kind=MethodDeclarationBlock, and the body of the method will be the Body of that BlockStatement.

public:
 static Microsoft::CodeAnalysis::VisualBasic::Syntax::MethodStatementSyntax ^ SubStatement(Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::AttributeListSyntax ^> attributeLists, Microsoft::CodeAnalysis::SyntaxTokenList modifiers, Microsoft::CodeAnalysis::SyntaxToken subOrFunctionKeyword, Microsoft::CodeAnalysis::SyntaxToken identifier, Microsoft::CodeAnalysis::VisualBasic::Syntax::TypeParameterListSyntax ^ typeParameterList, Microsoft::CodeAnalysis::VisualBasic::Syntax::ParameterListSyntax ^ parameterList, Microsoft::CodeAnalysis::VisualBasic::Syntax::SimpleAsClauseSyntax ^ asClause, Microsoft::CodeAnalysis::VisualBasic::Syntax::HandlesClauseSyntax ^ handlesClause, Microsoft::CodeAnalysis::VisualBasic::Syntax::ImplementsClauseSyntax ^ implementsClause);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax SubStatement (Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.SyntaxToken subOrFunctionKeyword, Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.VisualBasic.Syntax.TypeParameterListSyntax typeParameterList, Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax parameterList, Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax asClause, Microsoft.CodeAnalysis.VisualBasic.Syntax.HandlesClauseSyntax handlesClause, Microsoft.CodeAnalysis.VisualBasic.Syntax.ImplementsClauseSyntax implementsClause);
static member SubStatement : Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.TypeParameterListSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.HandlesClauseSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ImplementsClauseSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax
Public Shared Function SubStatement (attributeLists As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax, handlesClause As HandlesClauseSyntax, implementsClause As ImplementsClauseSyntax) As MethodStatementSyntax

Parameters

attributeLists
SyntaxList<AttributeListSyntax>

A list of all attribute lists on this declaration. If no attributes were specified, Nothing is returned.

modifiers
SyntaxTokenList

A list of all the modifier tokens that were present on this declaration. If no modifiers were specified, an empty list is returned. A bitfield version of all the modifiers ORed together, which is in many cases easier to use, can be obtained with the Modifiers property.

subOrFunctionKeyword
SyntaxToken

The "Sub" or "Function" keyword that introduces this method declaration.

identifier
SyntaxToken

The name of the method being declared.

typeParameterList
TypeParameterListSyntax

If present, a type parameter list with generic type parameters for this method. If no generic type parameters were present, Nothing is returned.

parameterList
ParameterListSyntax

The method's parameter list including the parentheses. If no parameter list was present, Nothing is returned.

asClause
SimpleAsClauseSyntax

The "As" clause that describes the return type. If no As clause was present, Nothing is returned.

handlesClause
HandlesClauseSyntax

If present, a Handles clause indicated the events that this method handles.

implementsClause
ImplementsClauseSyntax

If present, an Implements clause indicated the interface methods that this method implements.

Returns

Applies to