Ejemplo n.º 1
0
        public void Go()
        {
            IEnumerable <int> myInts = new List <int> {
                1, 2, 3, 4, 5, 4, 3, 2
            };

            Price[] euroPrices = myInts
                                 .Cast <double>()
                                 .Where(num => num % 2 == 0)
                                 .Select(num =>
            {
                var p = new Price(num);
                p.ConvertToEuro();
                return(p);
            })
                                 .ToArray();
        }