Last active
December 22, 2015 01:59
-
-
Save genghisjahn/6400316 to your computer and use it in GitHub Desktop.
Human & Person classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Human | |
{ | |
public string LastName { get; set; } | |
public string FirstName { get; set; } | |
public string BirthDay { get; set; } | |
public Int16 HeightInInches { get; set; } | |
public override string ToString() | |
{ | |
return string.Format("{0}, {1} is {2} inches tall. Born on {3}", this.LastName, this.FirstName, this.HeightInInches, this.BirthDay); | |
} | |
} | |
public class Person | |
{ | |
public string Name { get; set; } | |
public DateTime DOB { get; set; } | |
public int HeightInCM { get; set; } | |
public override string ToString() | |
{ | |
return string.Format("{0} is {1} cm tall. Born on {2}", this.Name, this.HeightInCM, this.DOB.ToShortDateString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment