Answers for "c# linq aggregate string builder"

C#
0

c# linq aggregate string builder

string[] words = { "one", "two", "three" };
var res = words.Aggregate(
   "", // start with empty string to handle empty list case.
   (current, next) => current + ", " + next);
Console.WriteLine(res);
Posted by: Guest on May-27-2021

C# Answers by Framework

Browse Popular Code Answers by Language