I receive a null reference exception at Shapes[0].DamageofShape[0] = 7;
. Do I need to do another initialization somewhere?
public struct TestArrayStruct
{
public int[] DamageofShape;
}
class Program
{
static void Main(string[] args)
{
TestArrayStruct[] Shapes = new TestArrayStruct[5];
Shapes[0].DamageofShape[0] = 7;
}
}