예제 #1
0
        static void Main(string[] args)
        {
            PointList set = new PointList();

            set.Add(new Point(4, 5));
            set.Add(new Point(4, 5));
            set.Add(new Point(4, 5));
            set.Add(new Point(7, 1));
            set.Add(new Point(7, 2));
            set.Add(new Point(5, 2));
            set.Add(new Point(7, 2));
            Console.WriteLine("Список точек на плоскости:");

            foreach (Point p in set)
            {
                Console.WriteLine(p.ToString());
            }

            Console.ReadKey();
        }
예제 #2
0
        static void Main()
        {
            do
            {
                Console.Clear();

                PointList set = new PointList();
                set.Add(new Point(4, 5));
                set.Add(new Point(4, 5));
                set.Add(new Point(4, 5));
                set.Add(new Point(7, 1));
                set.Add(new Point(7, 2));
                set.Add(new Point(5, 2));
                set.Add(new Point(7, 2));
                Console.WriteLine("Список точек на плоскости:");
                foreach (Point p in set)
                {
                    Console.WriteLine(p);
                }

                Console.WriteLine("Press Esc to exit. Press any other key to continue.");
            } while (Console.ReadKey(true).Key != ConsoleKey.Escape);
        }