private static void Main(string[] args) { Hole hole = new Hole(10); RoundThing roundThing = new RoundThing { Radius = 8 }; SquareThing squareThing = new SquareThing(10); hole.Fits(roundThing); hole.Fits(new SquareThingAdapter(squareThing)); Console.ReadKey(); }
public void Fits(RoundThing roundThing) { Console.WriteLine(_radius > roundThing.Radius ? "It FITS!!" : "It does not fit!"); }