One of my code throws this exception:
An exception of type 'System.InvalidCastException' occurred in mscorlib.ni.dll but was not handled in user code
Additional information: At least one element in the source array could not be cast down to the destination array type.
I get this exception on visual studio 2013 when I run this project on Windows Phone. OS version is 8.1 developer preview.
the Code snippet is:
private var BootlePattern : int[];
var BootleHits : boolean[];
var maxBottle : int;
function Start() {
...
BootlePattern=new Array(maxBottle);
BootleHits=new Array(maxBottle);
...
}
Can anyone please suggest anything about how to solve this?