I have a code that looks (more or less):
public void INeedHolidaysNow(double[,]){ //... Code to take a break from coding and fly to Hawaii } double[][] WageLossPerVacationDay = new double[10][5]; INeedHolidays(WageLossPerVacationDay); // >>throws the Exception in the Title
I found a solution on this post , which is to cyclize, not try wild casting
So my question is: WHY? what happens behind the scenes in memory allocation, which prevents what it might seem - at least at first glance, to be a valid throw? I mean structurally, both expressions seem completely identical. What am I missing here?
EDIT: I have to use "double [] []" as it is provided by an external library.
arrays c #
Mehdi LAMRANI
source share