Partilhar via


SyntaxFactory.UsingStatement Method

Definition

Overloads

UsingStatement(ExpressionSyntax, SeparatedSyntaxList<VariableDeclaratorSyntax>)

The Using statement that begins a Using block. This statement always occurs as the Begin of a UsingBlock, and the body of the Using is the Body of that UsingBlock.

UsingStatement(SyntaxToken, ExpressionSyntax, SeparatedSyntaxList<VariableDeclaratorSyntax>)

The Using statement that begins a Using block. This statement always occurs as the Begin of a UsingBlock, and the body of the Using is the Body of that UsingBlock.

UsingStatement()

The Using statement that begins a Using block. This statement always occurs as the Begin of a UsingBlock, and the body of the Using is the Body of that UsingBlock.

UsingStatement(ExpressionSyntax, SeparatedSyntaxList<VariableDeclaratorSyntax>)

Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
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 Using statement that begins a Using block. This statement always occurs as the Begin of a UsingBlock, and the body of the Using is the Body of that UsingBlock.

public:
 static Microsoft::CodeAnalysis::VisualBasic::Syntax::UsingStatementSyntax ^ UsingStatement(Microsoft::CodeAnalysis::VisualBasic::Syntax::ExpressionSyntax ^ expression, Microsoft::CodeAnalysis::SeparatedSyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::VariableDeclaratorSyntax ^> variables);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.UsingStatementSyntax UsingStatement (Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax expression, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.VariableDeclaratorSyntax> variables);
static member UsingStatement : Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.VariableDeclaratorSyntax> -> Microsoft.CodeAnalysis.VisualBasic.Syntax.UsingStatementSyntax
Public Shared Function UsingStatement (expression As ExpressionSyntax, variables As SeparatedSyntaxList(Of VariableDeclaratorSyntax)) As UsingStatementSyntax

Parameters

expression
ExpressionSyntax

If the Using statement is of a form that does not declare a new variable, this is the expression used in the using. Otherwise, Nothing is returned.

variables
SeparatedSyntaxList<VariableDeclaratorSyntax>

If the Using statement is of a form that declares one or more new variables, this is the list of variable declarations. Otherwise, Nothing is returned.

Returns

Applies to

UsingStatement(SyntaxToken, ExpressionSyntax, SeparatedSyntaxList<VariableDeclaratorSyntax>)

Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
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 Using statement that begins a Using block. This statement always occurs as the Begin of a UsingBlock, and the body of the Using is the Body of that UsingBlock.

public:
 static Microsoft::CodeAnalysis::VisualBasic::Syntax::UsingStatementSyntax ^ UsingStatement(Microsoft::CodeAnalysis::SyntaxToken usingKeyword, Microsoft::CodeAnalysis::VisualBasic::Syntax::ExpressionSyntax ^ expression, Microsoft::CodeAnalysis::SeparatedSyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::VariableDeclaratorSyntax ^> variables);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.UsingStatementSyntax UsingStatement (Microsoft.CodeAnalysis.SyntaxToken usingKeyword, Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax expression, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.VariableDeclaratorSyntax> variables);
static member UsingStatement : Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.VariableDeclaratorSyntax> -> Microsoft.CodeAnalysis.VisualBasic.Syntax.UsingStatementSyntax
Public Shared Function UsingStatement (usingKeyword As SyntaxToken, expression As ExpressionSyntax, variables As SeparatedSyntaxList(Of VariableDeclaratorSyntax)) As UsingStatementSyntax

Parameters

usingKeyword
SyntaxToken

The "Using" keyword.

expression
ExpressionSyntax

If the Using statement is of a form that does not declare a new variable, this is the expression used in the using. Otherwise, Nothing is returned.

variables
SeparatedSyntaxList<VariableDeclaratorSyntax>

If the Using statement is of a form that declares one or more new variables, this is the list of variable declarations. Otherwise, Nothing is returned.

Returns

Applies to

UsingStatement()

Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
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 Using statement that begins a Using block. This statement always occurs as the Begin of a UsingBlock, and the body of the Using is the Body of that UsingBlock.

public:
 static Microsoft::CodeAnalysis::VisualBasic::Syntax::UsingStatementSyntax ^ UsingStatement();
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.UsingStatementSyntax UsingStatement ();
static member UsingStatement : unit -> Microsoft.CodeAnalysis.VisualBasic.Syntax.UsingStatementSyntax
Public Shared Function UsingStatement () As UsingStatementSyntax

Returns

Applies to