Restart code cleanup and empty lines

Is it possible to do something like this:

namespace MyNamespace {
   <-- blank line
   public class MyClass {
      <-- blank line 
      public void MyMethod1() {
         //something
      }
      <-- blank line
      public void MyMethod2() {
         //something
      }
   }
}

      

When using the "Clear Code" option? He is currently doing the following:

namespace MyNamespace{  
   public class MyClass {
      public void MyMethod1() {
         //something
      }

      public void MyMethod2() {
         //something
      }
   }
}

      

Thanks in advance,

Andre Carlucci

+2


source to share


2 answers


In my opinion you cannot do it with the latest ReSharper (4.5.1).
I know ReSharper parameters well, but I don't know anything that would format the code the way you would like. You are looking for something like "blank lines inside namespace" or "blank lines inside class" that does not exist as an option.



+2


source


Preferences allow you to customize blank lines between elements of the same type, for example by method interpolation. I can't see how to add lines between namespace and class words.



Functions> C #> Formatting Style> Blank Lines

0


source







All Articles