using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Xml.Linq;
namespace ACCode
{
class Program
{
static void Main(string[] args)
{
List<string> movieNames = new List<string>();
movieNames.Add("Theri");
movieNames.Add("Kabali");
movieNames.Add("Bahubali 2");
// option 1 - using the string.join method
var output1 = string.Join(", ", movieNames.ToArray());
// option 2 - using the Lambda expression / aggregate method defined in System.Linq namespace.
var output2 = movieNames.Aggregate((a, b) => a + ", " + b);
Console.WriteLine(output1);
Console.WriteLine(output2);
Console.ReadLine();
}
}
}