コード例 #1
0
 public Quadrangle(Services.Type type, double[] coords) // Конструктор класса
 {
     _id     = num;
     _type   = type;
     _coords = coords;
     num++;
 }
コード例 #2
0
            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();
            }