gpt4 book ai didi

.net - VB.NET 项目属性命名空间与导入语句?

转载 作者:行者123 更新时间:2023-12-01 10:03:43 24 4
gpt4 key购买 nike

在 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com