You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following proposal :
Assign properties in constructor parameters .
public class Person {
// 1. constructor without body:
public Person (this.FirstName, this.LastName);
// 2. with body :
public Person (this.FirstName, string lastName){
LastName = lastName;
}
public string FirstName {get;set;}
public string LastName {get;set;}
}
The closest alternative is using Records.
The text was updated successfully, but these errors were encountered:
I have the following proposal :
Assign properties in constructor parameters .
The closest alternative is using Records.
The text was updated successfully, but these errors were encountered: