views:

237

answers:

2

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 Code Cleanup option? Currently it's doing like this:

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

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

Thanks in advance,

André Carlucci

A: 

The preferences allow you to configure blank lines between elements of the same kind e.g., method to method spacing. I can't see how to add lines between say the namespace and class.

Options > C# > Formatting Style > Blank Lines

Colin Gravill
I think that there is no such option ... I doubt that R# can do what andrecarlucci wants.
tanascius
+2  A: 

In my opinion you can not do this with the latest ReSharper (4.5.1).
I know the options of the ReSharper very well, but I am not aware of anything that would format the code in a way you'd like.
You are looking for something like "blank lines inside namespace" or "blank lines inside class", which does not exist as an option.

tanascius

related questions