SyntaxFactory.FunctionStatement 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
FunctionStatement(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. |
FunctionStatement(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. |
FunctionStatement(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. |
FunctionStatement(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. |
FunctionStatement(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
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 ^ FunctionStatement(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 FunctionStatement (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 FunctionStatement : 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 FunctionStatement (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
FunctionStatement(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
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 ^ FunctionStatement(Microsoft::CodeAnalysis::SyntaxToken identifier);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax FunctionStatement (Microsoft.CodeAnalysis.SyntaxToken identifier);
static member FunctionStatement : Microsoft.CodeAnalysis.SyntaxToken -> Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax
Public Shared Function FunctionStatement (identifier As SyntaxToken) As MethodStatementSyntax
Parameters
- identifier
- SyntaxToken
The name of the method being declared.
Returns
Applies to
FunctionStatement(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
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 ^ FunctionStatement(System::String ^ identifier);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax FunctionStatement (string identifier);
static member FunctionStatement : string -> Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax
Public Shared Function FunctionStatement (identifier As String) As MethodStatementSyntax
Parameters
- identifier
- String
The name of the method being declared.
Returns
Applies to
FunctionStatement(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
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 ^ FunctionStatement(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 FunctionStatement (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 FunctionStatement : 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 FunctionStatement (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.