4dwucw
Last Updated: February 25, 2016
·
1.745K
· iondrimba
178548

Convert string array to int array - 3 steps!

char[] delimiters = new char[] { ',' };
string[] stringArray = "1,2,3,4,5".Split( delimiters );
int[] intArray = Array.ConvertAll( stringArray, s => int.Parse( s ) );
Say Thanks
Respond

1 Response
Add your response

12469
7af4a55af1781c82526a8962ad7f4328

Also, with linq

int[] intArray = stringArray.Select(x=> int.Parse(x)).ToArray();

over 1 year ago ·