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