共用方式為


CompilationUnitSyntax.WithImports Method

Definition

Returns a copy of this with the [Imports] property changed to the specified value. Returns this instance if the specified value is the same as the current value.

public:
 Microsoft::CodeAnalysis::VisualBasic::Syntax::CompilationUnitSyntax ^ WithImports(Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::ImportsStatementSyntax ^> imports);
public Microsoft.CodeAnalysis.VisualBasic.Syntax.CompilationUnitSyntax WithImports (Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.ImportsStatementSyntax> imports);
member this.WithImports : Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.ImportsStatementSyntax> -> Microsoft.CodeAnalysis.VisualBasic.Syntax.CompilationUnitSyntax
Public Function WithImports (imports As SyntaxList(Of ImportsStatementSyntax)) As CompilationUnitSyntax

Parameters

Returns

Applies to