namespace _2024._09._13
{
    internal class Program
    {
        static void Main(string[] args)
        {
            var elemek = new List<Pelda>()
            {
                new Pelda (33, 11),
                new Pelda (88, 12),
                new Pelda (44, 11),
                new Pelda (7, 12),
                new Pelda (9, 11),

            };

            var elemek2 = new List<Pelda2>()
            {
                new Pelda2 (33, 11),
                new Pelda2 (88, 12),
                new Pelda2 (44, 11),
                new Pelda2 (7, 12),
                new Pelda2 (9, 11),

            };

            var eredmeny2 = elemek
                .GroupBy(i => i.Y);

            var eredmeny3 = elemek
                .Join(elemek2, i => i.Y, j => j.Y, (i, j) => new
                {
                    X = i.X,
                    Y = i.Y,
                    Z = j.Z
                });

            //foreach (var group in eredmeny2)
            //{
                //foreach (var item in group)
                //{
                    //Console.WriteLine($"{item.X}, {item.Y}");
                //}
            //}

            //foreach (var item in eredmeny3 )
            //{
                //Console.WriteLine($"{item.X}, {item.Y}, {item.Z}");
            //}

            var test = elemek.Skip(2).Take(3);
            Console.WriteLine(test);
            
        }
    }
}
