public static void Main()
Rectangle MyRectangle = new Rectangle();
Triangle MyTriangle = new Triangle();
Circle MyCircle = new Circle();
get { return this.height; }
set { this.height = value; }
get { return this.width; }
set { this.width = value; }
public virtual void Area()
Console.WriteLine("The area of the shape is yet to be defined");
public override void Area()
Console.WriteLine("The area of the MyRectangle is {0}", Width * Height);
public override void Area()
Console.WriteLine("The area of the MyTriangle is {0}", 0.5 * Width * Height);
get { return this.radius; }
set { this.radius = value; }
public override void Area()
Console.WriteLine("The area of the MyCircle is {0:0.00}", Math.PI * radius * radius);