Hi Team,
I have an array of objects[] but I want to convert them to an array of doubles[]
I tried in the following ways.............. but I got error (cannont implicitly convert object[] to double[])
1. double[] values = (double[])o; (here o means object array)
2. double[] values = o.Cast<double>().ToArray(typeof(double));
3.
I have an array of objects[] but I want to convert them to an array of doubles[]
I tried in the following ways.............. but I got error (cannont implicitly convert object[] to double[])
1. double[] values = (double[])o; (here o means object array)
2. double[] values = o.Cast<double>().ToArray(typeof(double));
3.
var doubles = Array.ConvertAll<object, double>(objects, o => (double)o);