C# Program to Demonstrate the Example of LINQ Aggregate() Method

C# Program to Demonstrate the Example of LINQ Aggregate() Method The article is a lively article because it contains interesting information and your favorite.   

C# Program to Demonstrate the Example of LINQ Aggregate() Method

C# Program to Demonstrate the Example of LINQ Aggregate() Method

//C# Program to demonstrate Linq Aggregate() method.

using System;
using System.Linq;

class LinqDemo
{
    static void Main(string[] args)
    {
        string[] Courses = { "BCA", "MCA", "MBA", "MA", "CA", "BBA" };

        string rstString = "";
        
        rstString=Courses.Aggregate((s1, s2) => s1 + ", " + s2);

        Console.WriteLine(rstString);
    }
}
BCA, MCA, MBA, MA, CA, BBA
Press any key to continue . . .

Final Words

I hope you find the article C# Program to Demonstrate the Example of LINQ Aggregate() Method uses. The reason is that we have told you all the information through this article in a way that you can understand. And if you have any doubts, you can express your doubts through the comment box. We also ask that you help share this article with your friends.

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Deekshi. Here, I post about programming to help developers.

Share on:

Leave a Comment