I have a Int[][] jagged array, and I want to convert it to Double[][] jagged array. Of course I don't want to change the value inside the array for example:
C#
int[2][1] = 10and when it converted to double,
C#
int[2][1] = 10So i have value[][] which is type is integer. and i want to convert it to double.

Dorababu MekaRank #457 · 5.5K reputationPosted Jul 18, 2011, 1:45 AM EDT
private double[][] inttodoublearray(int[][] val) { var v= new double[val.Length][]; for (int i = 0; i val.Length; i++ ) { v[i] = new double[val[i].Length]; for (int j = 0; j val[i].Length; j++) { v[i][j] = (double)val[i][j]; } } return v; }