how to convert a list to [] in c# code example
Example 1: string to list c#
var names = "Brian,Joe,Chris";
List<string> result = names.Split(',').ToList();
Example 2: c# array to list
var intArray = new[] { 1, 2, 3, 4, 5 };
var list = new List<int>(intArray);