c# function list code example
Example 1: c# writeline list
Console.WriteLine("List of Numbers: {0}",string.Join("",list));
//Output: List of Numbers: 123456789
Console.WriteLine("List of Numbers: {0}",string.Join(",",list));
//Output: List of Numbers: 1,2,3,4,5,6,7,8,9
Example 2: to list c#
var arr = new int[] {1, 2, 3};
List<int> list = arr.ToList();