在 VB.NET 项目中,在 Project-Properties 中导入命名空间和使用 Imports [NameSpace]
有什么区别?文件开头的语句?
最佳答案
项目属性中的导入适用于所有代码文件。Imports
指令仅适用于声明它的类。
来自 How to: Add or Remove Imported Namespaces (Visual Basic)在 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.
关于.net - VB.NET 项目属性命名空间与导入语句?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13027628/