Understanding why printing System.Int32[]

Godot Version

4.2.1

Question

I’m trying to learn C# and understand code. I’m trying to print the value of a variable, but the output is System.Int32[]. What does this mean?

preCalculatedSquaresToEdge[i + j * 8] = new int[8] { up, left, down, right, d1, d2, d3, d4 };
GD.Print(preCalculatedSquaresToEdge[i + j * 8].ToString());

The variable was defined like this:

private static readonly int[][] preCalculatedSquaresToEdge = new int[64][];

is table of 32 bit integers. if you want print whole table you can use for loop or foreach.
Check what collections you can use.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.