private static void PrintFigure(Figure figure) { string whoAmI = figure.WhoAmI(); string typeName = figure.GetType().Name; double area = figure.ComputeArea(); if (whoAmI != typeName) Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine( "WhoAmI = {0,-9} ; Имя класса {1,-9} ; Площадь={2:F2}", whoAmI, typeName, area ); Console.ResetColor(); }