Skip to content

Refactorings in record types #1741

Description

@nvmkpk

I would like a simple refactoring on a record type to convert between constructor defined property and regular CLR property. Below is the example:

public record MyType(int Value1, [property: Range(10, 20)] int Value2);

The refactoring should be able to convert it to:

public record MyType(int Value1)
{
    [Range(10, 20)]
    public int Value2
    {
        get;
        init;
    }
}

It should be able to convert it back as well.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions