Skip to content

Instantly share code, notes, and snippets.

@genghisjahn
Last active December 22, 2015 01:59
Show Gist options
  • Save genghisjahn/6400316 to your computer and use it in GitHub Desktop.
Save genghisjahn/6400316 to your computer and use it in GitHub Desktop.
Human & Person classes
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