Visual Studio or Resharper functionality for placement of using directives

后端 未结 7 720
猫巷女王i
猫巷女王i 2020-12-02 14:56

I like to put my using directives inside the current namespace, and not outside as VS and Resharper per default puts them.

Does anyone know of a macro/standard funct

7条回答
  •  北海茫月
    2020-12-02 15:41

    UPDATE - ReSharper 2016.1: This option is now moved to Code Editing → C# → Code Style → Add 'using' directive to the deepest scope

    Have you tried the ReSharper option:

    Languages → C# → Formatting Style → Namespace Imports → Add using directive to the deepest scope

    I'm not sure whether R#'s code cleanup will reorder the existing ones for you though.

提交回复
热议问题