让ReSharper保持“使用系统";优化使用时 [英] Have ReSharper keep 'using System;' when optimizing usings
本文介绍了让ReSharper保持“使用系统";优化使用时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否有某些选项可以防止ReSharper仅删除using System;
指令?也许这可以在某个地方配置?
I was wondering if there is some option to keep ReSharper from removing just the using System;
directive? Perhaps this is configurable somewhere?
还有,是否有办法让ReSharper像Visual Studio 2008一样对其余的指令进行排序(我认为是按字母顺序排列)?
Also, is there a way to have ReSharper sort the remaining directives just as Visual Studio 2008 does it (alphabetically, I think)?
谢谢.
推荐答案
是的,有这样一个选项:ReSharper->语言-> C#->命名空间导入.您可以添加不应删除的名称空间以及应始终导入的名称空间.
Yes, there is such an option: ReSharper->Languages->C#->Namespace Imports. You can add namespaces,that should not be removed, as well as namespaces, that should always be imported.
这篇关于让ReSharper保持“使用系统";优化使用时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文