SyntaxFactory.DeclareSubStatement 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
DeclareSubStatement(SyntaxToken, LiteralExpressionSyntax) |
A Declare statement that declares an external DLL method. |
DeclareSubStatement(String, LiteralExpressionSyntax) |
A Declare statement that declares an external DLL method. |
DeclareSubStatement(SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, SyntaxToken, LiteralExpressionSyntax, LiteralExpressionSyntax, ParameterListSyntax, SimpleAsClauseSyntax) |
A Declare statement that declares an external DLL method. |
DeclareSubStatement(SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken, LiteralExpressionSyntax, SyntaxToken, LiteralExpressionSyntax, ParameterListSyntax, SimpleAsClauseSyntax) |
A Declare statement that declares an external DLL method. |
DeclareSubStatement(SyntaxToken, LiteralExpressionSyntax)
- 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
A Declare statement that declares an external DLL method.
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::DeclareStatementSyntax ^ DeclareSubStatement(Microsoft::CodeAnalysis::SyntaxToken identifier, Microsoft::CodeAnalysis::VisualBasic::Syntax::LiteralExpressionSyntax ^ libraryName);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax DeclareSubStatement (Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax libraryName);
static member DeclareSubStatement : Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax
Public Shared Function DeclareSubStatement (identifier As SyntaxToken, libraryName As LiteralExpressionSyntax) As DeclareStatementSyntax
Parameters
- identifier
- SyntaxToken
The name of the method being declared.
- libraryName
- LiteralExpressionSyntax
The string literal with the library name.
Returns
Applies to
DeclareSubStatement(String, LiteralExpressionSyntax)
- 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
A Declare statement that declares an external DLL method.
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::DeclareStatementSyntax ^ DeclareSubStatement(System::String ^ identifier, Microsoft::CodeAnalysis::VisualBasic::Syntax::LiteralExpressionSyntax ^ libraryName);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax DeclareSubStatement (string identifier, Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax libraryName);
static member DeclareSubStatement : string * Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax
Public Shared Function DeclareSubStatement (identifier As String, libraryName As LiteralExpressionSyntax) As DeclareStatementSyntax
Parameters
- identifier
- String
The name of the method being declared.
- libraryName
- LiteralExpressionSyntax
The string literal with the library name.
Returns
Applies to
DeclareSubStatement(SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, SyntaxToken, LiteralExpressionSyntax, LiteralExpressionSyntax, ParameterListSyntax, SimpleAsClauseSyntax)
- 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
A Declare statement that declares an external DLL method.
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::DeclareStatementSyntax ^ DeclareSubStatement(Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::AttributeListSyntax ^> attributeLists, Microsoft::CodeAnalysis::SyntaxTokenList modifiers, Microsoft::CodeAnalysis::SyntaxToken charsetKeyword, Microsoft::CodeAnalysis::SyntaxToken identifier, Microsoft::CodeAnalysis::VisualBasic::Syntax::LiteralExpressionSyntax ^ libraryName, Microsoft::CodeAnalysis::VisualBasic::Syntax::LiteralExpressionSyntax ^ aliasName, Microsoft::CodeAnalysis::VisualBasic::Syntax::ParameterListSyntax ^ parameterList, Microsoft::CodeAnalysis::VisualBasic::Syntax::SimpleAsClauseSyntax ^ asClause);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax DeclareSubStatement (Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.SyntaxToken charsetKeyword, Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax libraryName, Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax aliasName, Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax parameterList, Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax asClause);
static member DeclareSubStatement : Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax
Public Shared Function DeclareSubStatement (attributeLists As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, charsetKeyword As SyntaxToken, identifier As SyntaxToken, libraryName As LiteralExpressionSyntax, aliasName As LiteralExpressionSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DeclareStatementSyntax
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.
- charsetKeyword
- SyntaxToken
If present, the keyword that defines the string translation semantics of the external method.
- identifier
- SyntaxToken
The name of the method being declared.
- libraryName
- LiteralExpressionSyntax
The string literal with the library name.
- aliasName
- LiteralExpressionSyntax
The string literal with the alias. If not present, returns Nothing.
- 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.
Returns
Applies to
DeclareSubStatement(SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken, LiteralExpressionSyntax, SyntaxToken, LiteralExpressionSyntax, ParameterListSyntax, SimpleAsClauseSyntax)
- 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
A Declare statement that declares an external DLL method.
public:
static Microsoft::CodeAnalysis::VisualBasic::Syntax::DeclareStatementSyntax ^ DeclareSubStatement(Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::AttributeListSyntax ^> attributeLists, Microsoft::CodeAnalysis::SyntaxTokenList modifiers, Microsoft::CodeAnalysis::SyntaxToken declareKeyword, Microsoft::CodeAnalysis::SyntaxToken charsetKeyword, Microsoft::CodeAnalysis::SyntaxToken subOrFunctionKeyword, Microsoft::CodeAnalysis::SyntaxToken identifier, Microsoft::CodeAnalysis::SyntaxToken libKeyword, Microsoft::CodeAnalysis::VisualBasic::Syntax::LiteralExpressionSyntax ^ libraryName, Microsoft::CodeAnalysis::SyntaxToken aliasKeyword, Microsoft::CodeAnalysis::VisualBasic::Syntax::LiteralExpressionSyntax ^ aliasName, Microsoft::CodeAnalysis::VisualBasic::Syntax::ParameterListSyntax ^ parameterList, Microsoft::CodeAnalysis::VisualBasic::Syntax::SimpleAsClauseSyntax ^ asClause);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax DeclareSubStatement (Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.SyntaxToken declareKeyword, Microsoft.CodeAnalysis.SyntaxToken charsetKeyword, Microsoft.CodeAnalysis.SyntaxToken subOrFunctionKeyword, Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.SyntaxToken libKeyword, Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax libraryName, Microsoft.CodeAnalysis.SyntaxToken aliasKeyword, Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax aliasName, Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax parameterList, Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax asClause);
static member DeclareSubStatement : Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ParameterListSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.SimpleAsClauseSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax
Public Shared Function DeclareSubStatement (attributeLists As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, declareKeyword As SyntaxToken, charsetKeyword As SyntaxToken, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, libKeyword As SyntaxToken, libraryName As LiteralExpressionSyntax, aliasKeyword As SyntaxToken, aliasName As LiteralExpressionSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DeclareStatementSyntax
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.
- declareKeyword
- SyntaxToken
The "Declare" keyword.
- charsetKeyword
- SyntaxToken
If present, the keyword that defines the string translation semantics of the external method.
- subOrFunctionKeyword
- SyntaxToken
The "Sub" or "Function" keyword.
- identifier
- SyntaxToken
The name of the method being declared.
- libKeyword
- SyntaxToken
The "Lib" keyword.
- libraryName
- LiteralExpressionSyntax
The string literal with the library name.
- aliasKeyword
- SyntaxToken
If present, the "Alias" keyword. If not present, returns Nothing.
- aliasName
- LiteralExpressionSyntax
The string literal with the alias. If not present, returns Nothing.
- 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.