EN
C#/.NET - convert List to Array
13
points
In C#/.NET it is possible to convert List to array in fast way with ToArray method.
List<string> list = new List<string>()
{
"A", "B", "C"
};
string[] array = list.ToArray();
for(int i = 0; i < array.Length; ++i)
Console.Write(array[i] + " ");
Output:
A B C