3

I'm trying to find a way to have resharper auto-format single line case statements as shown:

switch (number)
{
    case 0: return 50;
    case 1: return 51;
    default: return 0;
}

Currently it formats like this:

switch (number)
{
    case 0: 
        return 50;
    case 1: 
        return 51;
    default: 
        return 0;
}
dan
  • 5,664
  • 8
  • 45
  • 59

1 Answers1

0

As of R# 9.1 this is not supported. However there is an item in the ReSharper issue tracker that you can follow and/or vote on if you'd like to see this included. Currently it has 'critical' priority which suggests it's something that's being considered to inclusion.

https://youtrack.jetbrains.com/issue/RSRP-388810

Drew Noakes
  • 300,895
  • 165
  • 679
  • 742