public static void Main()
var square = new Square() { Area = 4.0, SideLength = 2 };
var shape = new Shape() { Area = 3.0 };
var genericHandler = new ShapeHandlerGeneric<Shape>(square);
Console.WriteLine(genericHandler.GetArea());
public static void LogArea(Shape shape)
Console.WriteLine(shape.Area);
public double Area { get; set; }
public class Square : Shape
public int SideLength { get; set; }
public class ShapeHandlerGeneric<T> where T:Shape
public ShapeHandlerGeneric(T shape)