static void Main(string[] args) { Rectangle3 r = new Rectangle3(); r.length = 4.5; r.width = 3.5; r.Display(); Console.ReadLine(); }
public void Run() { try { Console.WriteLine("Enter, please, x and y"); int x = Int32.Parse(Console.ReadLine()); int y = Int32.Parse(Console.ReadLine()); Figure3 figura = new Figure3(x, y); Rectangle3 rec = new Rectangle3(x, y); Square3 sq = new Square3(x, y); figura.Drow(); sq.Drow(); rec.Drow(); } catch (FormatException) { Console.WriteLine("You have not entered a number, try again"); } }