阻止VS使用指令自动添加

编程入门 行业动态 更新时间:2024-10-27 05:32:24
本文介绍了阻止VS使用指令自动添加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我不介意在创建脚本时自动创建的using指令.那些很好.我所说的是在脚本顶部,自动生成的using指令,当我指的是超出范围的类型时,我会立即进行编码.沉默的恶魔身上的痘痘!

I don't mind the using directives which are automatically created when the script is created. Those are fine. What I'm talking about are the using directives which are automatically generated at the top of the script while I'm coding as soon as I refer to a type which is out of scope. A pox upon the silent fiends!

为澄清起见,当前,如果我尝试在脚本中尚未声明为使用"的某个名称空间中包含一个存在的类型,则该名称空间将自动添加到脚本顶部.这对我来说是不受欢迎的行为.

To clarify, currently if I try including a type which exists in some namespace which is not yet declared as 'using' in the script, said namespace will get auto-added to the top of the script. This is undesired behavior for me.

我只是喜欢手动添加我的名称空间.

I simply prefer to manually add my namespaces.

找到修复程序.在工具">选项...">文本编辑器">"C#">"IntelliSense"下,我必须取消选中显示未导入的命名空间中的项目(实验性)".

Found the fix. Under Tools > Options... > Text Editor > C# > IntelliSense, I had to uncheck 'Show items from unimported namespaces (experimental)'.

推荐答案

在工具下>选项...>文字编辑器> C# IntelliSense,取消选中显示未导入的命名空间中的项目(实验性)".

Under Tools > Options... > Text Editor > C# > IntelliSense, uncheck 'Show items from unimported namespaces (experimental)'.

更多推荐

阻止VS使用指令自动添加

本文发布于:2023-11-16 16:04:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1605770.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:指令

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!