public Quadrangle(Services.Type type, double[] coords) // Конструктор класса { _id = num; _type = type; _coords = coords; num++; }
public static void add() { double[] coords = Services.get_coords(); Services.Type type = Services.define_type(coords); if (type == Services.Type.Undefinded) { Console.WriteLine("It's not a square or rectangle, try again.."); return; } Quadrangle obj = new Quadrangle(type, coords); quadrangles.Add(obj); Console.WriteLine("Successfuly added new element:"); obj.view(); }