EN
C#/.NET - convert List to Array
13 points
xxxxxxxxxx
1
List<string> list = new List<string>()
2
{
3
"A", "B", "C"
4
};
5
6
string[] array = list.ToArray();
7
8
for(int i = 0; i < array.Length; ++i)
9
Console.Write(array[i] + " ");
Output:
xxxxxxxxxx
1
A B C