I need to use Arrays of multiple types for my program.
I tried to use:
Array testarray = new Array[2]
testarray.SetValue("value1",0);
testarray.SetValue(15,1);
this compiles, but creates an exception when trying to set the values.
I have to use:
Object[] testarray = new Object[2]
And everything works just fine.
I would thing the two should be identical as I have used Array to read values from an array with casting.
What kills me is that the code with Array compiles and I cannot find a single reference or example of the actual Array class everything I have found is always of a specific type.
Thanks
I tried to use:
Array testarray = new Array[2]
testarray.SetValue("value1",0);
testarray.SetValue(15,1);
this compiles, but creates an exception when trying to set the values.
I have to use:
Object[] testarray = new Object[2]
And everything works just fine.
I would thing the two should be identical as I have used Array to read values from an array with casting.
What kills me is that the code with Array compiles and I cannot find a single reference or example of the actual Array class everything I have found is always of a specific type.
Thanks