Visual Studio 2008像Eclipse一样自动添加命名空间

发布于 2024-08-10 12:33:15 字数 54 浏览 2 评论 0原文

VS2008 是否具有类似于 Eclipse 的功能,可以自动为未定义的名称空间添加导入声明?

Does VS2008 have a feature akin to Eclipse's ability to automatically add import declarations for undefined namespaces?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

演多会厌 2024-08-17 12:33:15

如果您有对包含命名空间的程序集的引用,只需浏览(或选择)您想要添加其命名空间的类型,然后按 CTRL + 。它将添加命名空间,

如下所示:

alt text http://img197 .imageshack.us/img197/6976/91301094.png

if you have a refrence to the assembly that contains the namespace just go over(or select) the type you want add its namespace then CTRL + . and it will add the namespace

this is what it looks like :

alt text http://img197.imageshack.us/img197/6976/91301094.png

清风无影 2024-08-17 12:33:15

VS 将帮助您解析对您尚未包含的命名空间中定义的类型的引用。右键单击类名,选择“解析”,然后选择一个选项。

VS will help you resolve references to types defined in namespaces that you haven't included. Right-click on a class name, select "resolve", and pick an option.

唐婉 2024-08-17 12:33:15

不幸的是,正如 David 提到的,没有像 Eclipse 那样的方法。不过还有其他插件,例如 ResharperCodeRush 在这些任务中进一步支持您。

As David mentioned there is no way like in Eclipse, unfortunately. Additional plugins however, like Resharper or CodeRush support you further in these tasks.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文