List
int result = lst.Aggregate((x, y) => x * y);
As per the articles (x,y) specifies input parameters and x*y as implementation, my doubt is, aggregate() is the method of list, then it has to have inner implementation of aggregation by its own, then what (x*y) specifies or rather needed here...
Please mention the articles explaining lambda and list separately...
Thanks in advance,
VulpesPosted Jul 17, 2013, 6:04 AM
chaitanyapai paiPosted Jul 17, 2013, 4:18 AM
chaitanyapai paiPosted Jul 17, 2013, 4:16 AM
Jignesh TrivediPosted Jul 17, 2013, 3:44 AM
hi,
as per my understanding Enumerable.Aggregate is perform operation over a sequence.
here if you perform multification it perform
1*2*3*4*5 = 120
Please refer
http://msdn.microsoft.com/en-us/library/bb548651.aspx
Aggregate is method of IEnumerable interface not List Class.
hope this will help you.