Answers for "convert string list to comma separated string c#"

C#
3

convert string list to comma separated string c#

Person[] people = {
        new Person(){ FirstName="Steve", LastName="Jobs"},
        new Person(){ FirstName="Bill", LastName="Gates"},
        new Person(){ FirstName="Lary", LastName="Page"}
    };
 
var str = String.Join(",", people.Select(p => p.FirstName) );
Posted by: Guest on February-01-2021
1

convert string list to comma separated string c#

string[] animals = { "Cat", "Alligator", "Fox", "Donkey" };
var str = String.Join(",", animals);
Posted by: Guest on February-01-2021

Code answers related to "convert string list to comma separated string c#"

C# Answers by Framework

Browse Popular Code Answers by Language