Roslyn: Refactoring "Move type to ..." removes modifier

Created on 3 Jan 2017  路  4Comments  路  Source: dotnet/roslyn

Version Used: Visual Studio 2017 RC 15.0.26014.0

Code to Reproduce:

public abstract class Foo
{
    private class Bar // Move type to Bar.cs
    {
    }
}

Actual Behavior:

public partial class Foo
{
}
Area-IDE Bug

All 4 comments

@CyrusNajmabadi didn't you fix this?

I'll check. I fixed at least one case of this. But there may be others.

I actually prefer to keep all modifiers at one place so that I do not have to go through each file when refactoring, so my expected would be partial class Foo here.

This has been fixed. THe original file will look like this:

```c#
public abstract partial class Foo
{
}


And the new file will look like this:

```c#
public abstract partial class Foo
{
    private class Bar // Move type to Bar.cs
    {
    }
}
Was this page helpful?
0 / 5 - 0 ratings