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

C#12 Primary Constructors #28

Open
DavidAJohn opened this issue Dec 11, 2023 · 0 comments
Open

C#12 Primary Constructors #28

DavidAJohn opened this issue Dec 11, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@DavidAJohn
Copy link
Owner

Primary constructors are a long-overdue addition to C#, as of version 12.

Where there is only one constructor declared (and that is most types in FotoStorio), there is now a simplified syntax available. So let's get to work.

Here's a Microsoft guide: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/tutorials/primary-constructors

Microsoft's motivation is described thus: "The ability of a class or struct in C# to have more than one constructor provides for generality, but at the expense of some tedium in the declaration syntax (my emphasis), because the constructor input and the class state need to be cleanly separated."

@DavidAJohn DavidAJohn added the enhancement New feature or request label Dec 11, 2023
@DavidAJohn DavidAJohn self-assigned this Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant