在 Visual Studio 2010、2012 中自动导入库的快捷方式是什么(如果有的话——比如 Netbeans 中的 Alt+Enter)? [英] What is the shortcut to auto import library in visual studio 2010, 2012 (if any- like Alt+Enter in Netbeans)?

查看:24
本文介绍了在 Visual Studio 2010、2012 中自动导入库的快捷方式是什么(如果有的话——比如 Netbeans 中的 Alt+Enter)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道在 C# winform/window store... 应用程序中自动生成命名空间导入的快捷按钮在哪里,比如 Alt+EnterNetBean IDE 中的快捷方式.我和我的一些朋友在visual studio中编程好几年了,但是当我们需要导入库时,我们必须将光标移动到Class代码后面,然后点击显示命名空间,如下所示:

I don't know where is the short-cut button to auto generate namespace import in C# winform/ window store... application, like the Alt+Enter shortcut in NetBean IDE. I and some of my friends have programmed in visual studio for several years but when we need to import library, we have to move the cursor after the Class code and click to show namespace like this:

感谢您的帮助:)

推荐答案

Try CTRL+. 打开快速修复,它会给你不同的选择来修复这样的问题一个错误,包括为正确的命名空间添加 using——如果 VS 在引用中找到有效的类型.

Try CTRL+. to open up the quick fix which will give you different options to fix such an error, including adding usings for the correct namespace—if VS finds a valid type in the references.

这篇关于在 Visual Studio 2010、2012 中自动导入库的快捷方式是什么(如果有的话——比如 Netbeans 中的 Alt+Enter)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆