'C# - float[][] declaration
I'm trying to declare this kind of variable:
float[][]
Things that didn't work for me (wouldn't compile) -
float[][] inputs = new float[10][5];
float[][] inputs = new float[10, 5];
When trying to declare the array like this -
int a = 3;
int b = 2;
float[][] inputs = new float[][]
{
new float[a],
new float[b]
};
I get a multidimensional array with two float arrays instead of an array that has 3 arrays and every array size is 2.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
