Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

array to list C

using System.Linq;

int[] ints = new [] { 10, 20, 10, 34, 113 };

List<int> lst = ints.OfType<int>().ToList(); // this isn't going to be fast.

OR

List<int> lst = new List<int> { 10, 20, 10, 34, 113 };
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #array #list #C
ADD COMMENT
Topic
Name
4+2 =