J
Jeroen Ceuppens
Hi, i get this error:
An unhandled exception of type 'System.InvalidCastException' occurred in
AviewerV1.exe
But, I use the same code also in another programma, and there it
works!?!?!?!?!?!?!?
There error is given on:
colormapdata[z]=(byte[])myEnumerator.Current; (changing it in
colormapdata[z]=(byte[])(myEnumerator.Current); also doesn't help)
With Quickwatch:
- myEnumerator.Current {System.Array} System.Object
[0] 0 int
[1] 0 int
[2] 0 int
[3] 131 int
Rest of the code:
ArrayList arrayList;
arrayList=ReadTxtFile();
colormapdata = new byte[256][];
System.Collections.IEnumerator myEnumerator = arrayList.GetEnumerator();
int z=0;
while ( myEnumerator.MoveNext() )
{
colormapdata[z]=(byte[])myEnumerator.Current;
z++;
}
Can anybody give me hints, where the problem could be?
Thx
JEroen
An unhandled exception of type 'System.InvalidCastException' occurred in
AviewerV1.exe
But, I use the same code also in another programma, and there it
works!?!?!?!?!?!?!?
There error is given on:
colormapdata[z]=(byte[])myEnumerator.Current; (changing it in
colormapdata[z]=(byte[])(myEnumerator.Current); also doesn't help)
With Quickwatch:
- myEnumerator.Current {System.Array} System.Object
[0] 0 int
[1] 0 int
[2] 0 int
[3] 131 int
Rest of the code:
ArrayList arrayList;
arrayList=ReadTxtFile();
colormapdata = new byte[256][];
System.Collections.IEnumerator myEnumerator = arrayList.GetEnumerator();
int z=0;
while ( myEnumerator.MoveNext() )
{
colormapdata[z]=(byte[])myEnumerator.Current;
z++;
}
Can anybody give me hints, where the problem could be?
Thx
JEroen