Skip to content

CC0017 Change to auto property fix all not working #514

@thorgeirk11

Description

@thorgeirk11

The code fix for CC0017 doesn't change all instances.

If the code fix is run on a document containing the following code:

private int x;
private int y;
public int X
{
    get { return x; }
    set { x = value; }
}

public int Y
{
    get { return y; }
    set { y = value; }
}

It results in the following:

private int x;
public int X
{
    get { return x; }
    set { x = value; }
}
public int Y { get; set; }

But of course it should be:

public int X { get; set; }
public int Y { get; set; }

I found this out when I was working on #500 and #512 but I am unsure how to fix it so I decided to just make a Issue out of it.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions