If you are looking for the fastest way with the least memory usage, then here
string[] StringNum = { "4699307989721714673", "4699307989231714673", "4623307989721714673", "4577930798721714673" }; long[] longNum = new long[StringNum.Length]; for (int i = 0; i < StringNum.Length; i++) longNum[i] = long.Parse(StringNum[i]);
Using new List<long>() bad because every time it needs an extension, it reallocates a lot of memory. It is better to use new List<long>(StringNum.Lenght) to allocate enough memory and prevent new List<long>(StringNum.Lenght) memory. Allocating enough memory to the list increases performance, but since you need long[] , an additional ToArray call to List<> will again redistribute all the memory to create an array. In the other hand, you know the size of the output, and you can first create an array and perform memory allocation.
source share