Roslyn: Add refactorings to split and merge nested if statements

Created on 16 Aug 2018  路  3Comments  路  Source: dotnet/roslyn

I frequently need to adjust complex if statements and miss some refactorings that could speed up this process.

For example I would like to be able to invoke a quick action on the first && to split
```C#
if (con1
&& (con2 || !con3)
&& !con4)
{

}

```C#
if (con1)
{
    if ((con2 || !con3)
        && !con4))
    {

    }
}

And a refactoring on the nested if to do the reverse.

4 - In Review Area-IDE Feature Request

Most helpful comment

@jasonmalinowski Can you please close this? The PR was merged.

All 3 comments

I am working on this.

Awesome, thanks @Neme12

@jasonmalinowski Can you please close this? The PR was merged.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NikChao picture NikChao  路  3Comments

DavidArno picture DavidArno  路  3Comments

MadsTorgersen picture MadsTorgersen  路  3Comments

OndrejPetrzilka picture OndrejPetrzilka  路  3Comments

JesperTreetop picture JesperTreetop  路  3Comments