If you are using several objects from the same namespace you can save typing by adding the necessary using directive to the top of your program
If you do not want to fully qualify your namespaces you can use the using directive.
This provides a way of importing a namespace so it does not have to be fully qualified.
The main use of the using directive is to be able to refer to types without having to fully qualify them all.
Using Alias Directive
This can be used to create an alias for a namespace or a type.
The right side of a using alias directive must always be fully qualified.
using Excel = Microsoft.Office.Excel
Imports Excel = Microsoft.Office.Excel
The using directive is not to be confused with the Using Statement which is used for defining the scope of objects.
© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext