
Head First C# Code: Chapter 7
Hide and Seek
OutsideWithDoor.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace __Hide_and_Seek
{
public class OutsideWithDoor : Outside, IHasExteriorDoor
{
public OutsideWithDoor(string name, bool hot, string doorDescription)
: base(name, hot)
{
this.doorDescription = doorDescription;
}
private string doorDescription;
public string DoorDescription
{
get { return doorDescription; }
}
private Location doorLocation;
public Location DoorLocation
{
get { return doorLocation; }
set { doorLocation = value; }
}
public override string Description
{
get
{
return base.Description + " You see " + doorDescription + ".";
}
}
}
}