Last active
August 29, 2015 14:25
-
-
Save caglartoklu/2078797e88c124bc91b6 to your computer and use it in GitHub Desktop.
C# List Concatenation #cs #list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
List<string> listed = new List<string>() {"1", "2", "3", "4"}; | |
Console.WriteLine(">" + string.Join("-", listed)); | |
// >1-2-3-4 | |
listed = new List<string>(); | |
Console.WriteLine(">" + string.Join("-", listed)); | |
// > | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment