namespace ConsoleApplication11
public class Rectangle : IShape
public Rectangle(double width, double height)
public class Circle : IShape
public Circle(double radius)
return Math.PI * Radius * Radius;
static void PrintArea(IShape Shape)
Console.WriteLine(Shape.Area());
public static void Main(string[] args)
Rectangle rectangle = new Rectangle(5, 10);
Circle circle = new Circle(5);