I have this array
char[] A = [\'1\', \'2\', \'3\', \'4\']
And I want to convert it to int[]
int[] Aint=[1, 2, 3, 4]
Another option, using Array.ConvertAll and Char.GetNumericValue:
int[] Aint = Array.ConvertAll(A, c => (int)Char.GetNumericValue(c));