using System.Collections.Generic;
public string kvadratnost = "kvadrat";
public string kruglost = "mihail";
private static string FormaEbat(Shape s)
throw new Exception("ti debil?");
private static string FormaEbat(Square s) => s.kvadratnost;
private static string FormaEbat(Circle s) => s.kruglost;
private static List<string> Misha()
var shapes = new List<Shape>();
shapes.Add(new Circle());
shapes.Add(new Square());
return shapes.Select(x => FormaEbat(x as dynamic) as string).ToList();
public static void Main (string[] args) {
Console.WriteLine (string.Join(", ", Misha()));