metaclass: (Default)
[personal profile] metaclass
      int[] tmp = new int[]{5,7,13};
      var test = from c in "ab"
                 from i in tmp
                 select new { a=c,b=i };
      var t1 = test.Aggregate(0,(aсс,x) => aсс+x.a);
      Console.WriteLine(t1);

результат: 585

Вот что бывает из-за неявных преобразований типов.

Date: 2010-01-13 01:47 am (UTC)
From: [identity profile] syarzhuk.livejournal.com
Патамушта а эта 97, а б - 98? Опять тяжкое наследие Ричи-Томсона

Profile

metaclass: (Default)
metaclass

April 2017

S M T W T F S
      1
2345678
9101112 131415
16171819202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 8th, 2025 05:28 am
Powered by Dreamwidth Studios