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

Added "propr" snippet for required properties #75339

Merged
merged 13 commits into from
Oct 8, 2024

Conversation

victor-pogor
Copy link
Contributor

@victor-pogor victor-pogor commented Oct 2, 2024

closes #75128

I have checked what modifiers are allowed and limited the propr snippet to the valid cases:

class C
{
    private required int Prop1 { get; set; } // Not valid
    protected required int Prop2 { get; set; } // Not valid
    internal required int Prop3 { get; set; } // OK
    private protected required int Prop4 { get; set; } // Not valid
    protected internal required int Prop5 { get; set; } // OK
    public required int Prop6 { get; set; } // OK
}

interface I
{
    required int Prop { get; set; } // Not valid
}
propr.mp4

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 2, 2024
@dotnet-policy-service dotnet-policy-service bot added Community The pull request was submitted by a contributor who is not a Microsoft employee. VSCode labels Oct 2, 2024
@victor-pogor victor-pogor marked this pull request as ready for review October 5, 2024 02:45
@victor-pogor victor-pogor requested a review from a team as a code owner October 5, 2024 02:45
Copy link
Contributor

@DoctorKrolic DoctorKrolic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. My opinion doesn't count really, but I expect a lot less feedback from the team member now. @victor-pogor You may resolve all leftover feedback items from me. Thanks for great work!

@DoctorKrolic
Copy link
Contributor

@akhera99 PTAL

Copy link
Member

@akhera99 akhera99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you @victor-pogor for the contribution and @DoctorKrolic for reviewing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee. untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Required Property in C# with propr
3 participants