lambda aggregation

            string centense = "a,b,c,d,e,f,,g";
            string [] names=centense.Split(',');
            string res= names.Aggregate((s1, s2) => s2 + "," + s1);
            Console.WriteLine(res);  //输出 g,,f,e,d,c,b,a

 

posted @ 2010-10-11 23:59  庚武  Views(211)  Comments(0Edit  收藏  举报