If I can implicitly cast an integer value to a double (and vice versa), like:
int a = 4;
double b = a;
// now b holds 4.0
Why can I not do this:
int[] intNumbers = {10, 6, 1, 9};
double[] doubleNumbers2 = intNumbers.Cast<double>().ToArray();
I get a "Specified cast is not valid" InvalidCastException
exception.
Doing the opposite (casting from double to int) results in the same error.
What am I doing wrong?