using System.Collections.Generic;
public static void Main(string[] args)
List<IGeo> geos = new List<IGeo>();
geos.Add(new Circle { X = 1, Y = 2, Radius = 3 });
geos.Add(new Circle { X = 2, Y = 15, Radius = 1 });
geos.Add(new Square { X = 3, Y = 7, Length = 15 });
geos.Add(new Square { X = 3, Y = 10, Length = 23 });
geos.Add(new Square { X = 7, Y = 0, Length = 2 });
public class Circle : IGeo
public int X { get; set; }
public int Y { get; set; }
public int Radius { get; set; }
Console.WriteLine(String.Format("Circle: {0} {1} {2}", X, Y, Radius));
public class Square : IGeo
public int X { get; set; }
public int Y { get; set; }
public int Length { get; set; }
Console.WriteLine(String.Format("Square: {0} {1} {2}", X, Y, Length));