Languages
[Edit]
EN

C# / .NET - convert List to Array

1 points
Created by:
Root-ssh
68810

1. List.ToArray method example

List<int> list = new List<int>()
{
	1, 2, 3
};

int[] array = list.ToArray();

foreach (int entry in array)
	Console.Write(entry + " ");

Output:

1 2 3

2. References

  1. List.ToArray Method - Microsoft Docs
Native Advertising
50 000 ad impressions - 449$
🚀
Get your tech brand or product in front of software developers.
For more information contact us:
Red dot
Dirask - friendly IT community for everyone.

❤️💻 🙂

Join