In a VB.NET project, what is the difference between importing a namespace in Project-Properties and using a Imports [NameSpace] statement at the start of a file?
Imports in the project properties apply to all code files.
The Imports directive only applies to the class it is declared in.
From How to: Add or Remove Imported Namespaces (Visual Basic) on MSDN:
Imported namespaces are managed on the References page of the Project Designer. The imports you specify in this dialog box are passed directly to the compiler (/imports) and apply to all files in your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With