Skip to content

Instantly share code, notes, and snippets.

@kunjee17
Created October 28, 2019 03:41
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 kunjee17/d8904f48662ae93dcf28953522758d8c to your computer and use it in GitHub Desktop.
Save kunjee17/d8904f48662ae93dcf28953522758d8c to your computer and use it in GitHub Desktop.
Normal Person in C#
class Person {
private readonly string firstName;
private readonly string lastName;
public Person(string firstName, string lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
public string FirstName { get {return this.firstName; } }
public string LastName { get {return this.lastName; } }
private string calculateFullName() {
return this.firstName + " " + this.lastName;
}
public string FullName { get {return this.calculateFullName(); } }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment