/imports (Visual Basic)
Imports namespaces from a specified assembly.
/imports:namespaceList
Arguments
Term |
Definition |
namespaceList |
Required. Comma-delimited list of namespaces to be imported. |
Comentários
The /imports option imports any namespace defined within the current set of source files or from any referenced assembly.
The members in a namespace specified with /imports are available to all source-code files in the compilation. Use the Declaração Imports (Tipo e Namespace .NET) to use a namespace in a single source-code file.
To set /imports in the Visual Studio integrated development environment |
|
Exemplo
The following code compiles when /imports:system is specified.
Module MyModule
Sub Main()
Console.WriteLine("test")
' Otherwise, would need
' System.Console.WriteLine("test")
End Sub
End Module
Consulte também
Referência
Exemplos de Linhas de Comando de Compilação (Visual Basic)
Conceitos
Referências e a instrução Imports (Visual Basic)