Example #1
0
        static void Main(string[] args)
        {
            SuperCollection <int> s = new SuperCollection <int>();

            try
            {
                s.Add(11);
                s.Add("11");
                s.Add(123.123);
            }
            catch (NotCorrectTypeException ex)
            {
                Console.WriteLine("Ошибка: " + ex.Message);
            }

            int[] arr = new int[20];
            for (int i = 0; i < 20; i++)
            {
                arr[i] = i;
            }
            arr[5]  = 0;
            arr[6]  = 0;
            arr[13] = 0;

            arr[2]  = -13;
            arr[16] = -1;
            arr[10] = -2;

            var Get0        = from t in arr where t == 0 select t;
            var GetNegative = from t in arr where t < 0 select t;

            foreach (var x in Get0)
            {
                Console.WriteLine(x);
            }
            foreach (var x in GetNegative)
            {
                Console.WriteLine(x);
            }

            Point p = new Point();

            p.x = 1;
            p.y = 2;

            p.useDelegates();

            Console.ReadLine();
        }