Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Created September 16, 2022 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgolubyev/5dbc21e00143090e4ec34bb7c6a98bd6 to your computer and use it in GitHub Desktop.
Save lgolubyev/5dbc21e00143090e4ec34bb7c6a98bd6 to your computer and use it in GitHub Desktop.
public class Person
{
public required string FirstName { get; init; }
public required string LastName {get; init; }
[SetsRequiredMembers]
public Person(string firstName, string lastName)
{
this.FirstName = firstName;
this.LastName = lastName;
}
public Person() {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment