public interface Forgeable
public class HomeHammer : Forgeable
Console.WriteLine("Using {0} to create steel", this);
return "25% quality steel";
public class ProfessionalHammer : Forgeable
Console.WriteLine("Using {0} to create steel", this);
return "75% quality steel";
public class Toolbox : Forgeable
public string Label = "Some toolbox";
public Toolbox(string textLabel)
private Forgeable hammer;
Console.WriteLine("Here I am getting {1} out of {0}", this.Label, hammer);
Console.WriteLine("Here I am putting {1} to {0}", this.Label, value);
return this.Label + " has created " + this.hammer.Forge();
public static void Main()
var GarageToolbox = new Toolbox("GarageToolbox");
var FathersHammer = new HomeHammer() ;
GarageToolbox.Hammer = FathersHammer;
var isFathersHammerInTheGarage = FathersHammer == GarageToolbox.Hammer;
Console.WriteLine(GarageToolbox.Forge());