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

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 ) );

1 Response
Add your response

12469

Also, with linq

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

over 1 year ago ·