Imports Directives
It often happens that you need to invoke types defined within long-named, nested namespaces. To invoke types, you need to write the full name of the type, which includes the identifier of the namespace that defines a particular type, as in the following code:
Dim aFile As New System.IO.FileStream("C:\test.txt", System.IO.FileMode.Open)Dim onePerson As New ImportsDirectives.People.Work.Customer
Although IntelliSense has been highly improved from previous versions and it helps in writing code, it can result quite annoyingly in typing long-named namespaces. To help developers write code faster, Visual Basic enables the usage of Imports directives. Such directives enable developers ...
Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.