Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can you explain brief about Aggregate() extension method in LINQ?

Answer Posted / Shilpi Tyagi

The Aggregate() extension method in LINQ is used to apply a user-defined aggregate function (like sum, product, min, max) to a sequence of elements. It takes two parameters: a seed value and a binary function that combines the elements into a single result.nExample:n```csharpnint[] numbers = { 1, 2, 3, 4, 5 };nint sum = numbers.Aggregate((acc, current) => acc + current); // sum will be 15```

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

No New Questions to Answer in this Category !!    You can

Post New Questions

Answer Questions in Different Category