Share via


SyntaxFactory.DeclareStatement Method

Definition

Overloads

DeclareStatement(SyntaxKind, SyntaxToken, SyntaxToken, LiteralExpressionSyntax)

A Declare statement that declares an external DLL method.

DeclareStatement(SyntaxKind, SyntaxToken, String, LiteralExpressionSyntax)

A Declare statement that declares an external DLL method.

DeclareStatement(SyntaxKind, SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, SyntaxToken, SyntaxToken, LiteralExpressionSyntax, LiteralExpressionSyntax, ParameterListSyntax, SimpleAsClauseSyntax)

A Declare statement that declares an external DLL method.

DeclareStatement(SyntaxKind, SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken, LiteralExpressionSyntax, SyntaxToken, LiteralExpressionSyntax, ParameterListSyntax, SimpleAsClauseSyntax)

A Declare statement that declares an external DLL method.

DeclareStatement(SyntaxKind, SyntaxToken, 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 ^ DeclareStatement(Microsoft::CodeAnalysis::VisualBasic::SyntaxKind kind, Microsoft::CodeAnalysis::SyntaxToken subOrFunctionKeyword, Microsoft::CodeAnalysis::SyntaxToken identifier, Microsoft::CodeAnalysis::VisualBasic::Syntax::LiteralExpressionSyntax ^ libraryName);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax DeclareStatement (Microsoft.CodeAnalysis.VisualBasic.SyntaxKind kind, Microsoft.CodeAnalysis.SyntaxToken subOrFunctionKeyword, Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax libraryName);
static member DeclareStatement : Microsoft.CodeAnalysis.VisualBasic.SyntaxKind * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax
Public Shared Function DeclareStatement (kind As SyntaxKind, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, libraryName As LiteralExpressionSyntax) As DeclareStatementSyntax

Parameters

kind
SyntaxKind

A SyntaxKind representing the specific kind of DeclareStatementSyntax. One of DeclareSubStatement, DeclareFunctionStatement.

subOrFunctionKeyword
SyntaxToken

The "Sub" or "Function" keyword.

identifier
SyntaxToken

The name of the method being declared.

libraryName
LiteralExpressionSyntax

The string literal with the library name.

Returns

Applies to

DeclareStatement(SyntaxKind, SyntaxToken, 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 ^ DeclareStatement(Microsoft::CodeAnalysis::VisualBasic::SyntaxKind kind, Microsoft::CodeAnalysis::SyntaxToken subOrFunctionKeyword, System::String ^ identifier, Microsoft::CodeAnalysis::VisualBasic::Syntax::LiteralExpressionSyntax ^ libraryName);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax DeclareStatement (Microsoft.CodeAnalysis.VisualBasic.SyntaxKind kind, Microsoft.CodeAnalysis.SyntaxToken subOrFunctionKeyword, string identifier, Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax libraryName);
static member DeclareStatement : Microsoft.CodeAnalysis.VisualBasic.SyntaxKind * Microsoft.CodeAnalysis.SyntaxToken * string * Microsoft.CodeAnalysis.VisualBasic.Syntax.LiteralExpressionSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.DeclareStatementSyntax
Public Shared Function DeclareStatement (kind As SyntaxKind, subOrFunctionKeyword As SyntaxToken, identifier As String, libraryName As LiteralExpressionSyntax) As DeclareStatementSyntax

Parameters

kind
SyntaxKind

A SyntaxKind representing the specific kind of DeclareStatementSyntax. One of DeclareSubStatement, DeclareFunctionStatement.

subOrFunctionKeyword
SyntaxToken

The "Sub" or "Function" keyword.

identifier
String

The name of the method being declared.

libraryName
LiteralExpressionSyntax

The string literal with the library name.

Returns

Applies to

DeclareStatement(SyntaxKind, SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, 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 ^ DeclareStatement(Microsoft::CodeAnalysis::VisualBasic::SyntaxKind kind, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::AttributeListSyntax ^> attributeLists, Microsoft::CodeAnalysis::SyntaxTokenList modifiers, Microsoft::CodeAnalysis::SyntaxToken charsetKeyword, Microsoft::CodeAnalysis::SyntaxToken subOrFunctionKeyword, 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 DeclareStatement (Microsoft.CodeAnalysis.VisualBasic.SyntaxKind kind, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.SyntaxToken charsetKeyword, Microsoft.CodeAnalysis.SyntaxToken subOrFunctionKeyword, 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 DeclareStatement : Microsoft.CodeAnalysis.VisualBasic.SyntaxKind * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.SyntaxToken * 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 DeclareStatement (kind As SyntaxKind, attributeLists As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, charsetKeyword As SyntaxToken, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, libraryName As LiteralExpressionSyntax, aliasName As LiteralExpressionSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DeclareStatementSyntax

Parameters

kind
SyntaxKind

A SyntaxKind representing the specific kind of DeclareStatementSyntax. One of DeclareSubStatement, DeclareFunctionStatement.

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.

subOrFunctionKeyword
SyntaxToken

The "Sub" or "Function" keyword.

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

DeclareStatement(SyntaxKind, 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 ^ DeclareStatement(Microsoft::CodeAnalysis::VisualBasic::SyntaxKind kind, 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 DeclareStatement (Microsoft.CodeAnalysis.VisualBasic.SyntaxKind kind, 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 DeclareStatement : Microsoft.CodeAnalysis.VisualBasic.SyntaxKind * 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 DeclareStatement (kind As SyntaxKind, 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

kind
SyntaxKind

A SyntaxKind representing the specific kind of DeclareStatementSyntax. One of DeclareSubStatement, DeclareFunctionStatement.

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.

Returns

Applies to