Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

How to declare an 3-dimensional array in C#?

$
0
0
I just tried to create an 3-dimensional array in C# (which seems to work, at least there are no errors)private int[,,] myarray = new int [sizeX,sizeY,sizeZ]; but when I try to write to the array myarray [valueX,valueY,valueZ] = 1; I get the following error: error CS0266: Cannot implicitly convert type `float' to `int'. An explicit conversion exists (are you missing a cast?) How do I use multidimensional arrays correctly? Thanks in advance Greets, xLuboex

Viewing all articles
Browse latest Browse all 7934

Trending Articles