Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# how to write an array in a single line

// How to display an array on the same line:
string[] names = {"name1", "name2", "name3"}
Console.WriteLine("{0}", string.Join(", ", names));
 
PREVIOUS NEXT
Tagged: #write #array #single #line
ADD COMMENT
Topic
Name
6+3 =