Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use auto property does not remove this which is present only by necessity #77011

Open
RenderMichael opened this issue Feb 4, 2025 · 0 comments
Labels
Area-IDE Feature - IDE0032 Use auto property untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@RenderMichael
Copy link
Contributor

Version Used:
17.13.0 preview 4.0

Steps to Reproduce:

class C
{
    private readonly string a;

    public C(string a)
    {
        this.a = a;
    }

    public string A => a;
}

Diagnostic Id:

Fixer for IDE0032: Use auto property does not remove this keyword which was necessary for disambiguation but otherwise unfavored per style configuration.

Expected Behavior:

class C
{
    public C(string a)
    {
        A = a;
    }

    public string A { get; }
}

Actual Behavior:

class C
{
    public C(string a)
    {
        this.A = a;
    }

    public string A { get; }
}
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 4, 2025
@deepakrathore33 deepakrathore33 added the Feature - IDE0032 Use auto property label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Feature - IDE0032 Use auto property untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

2 participants