hi i wrote a code i c# and i create stuct array from struct that has a array but i have a error on Visual Studio.
my code:
public
class o {
public int[] a = new int[5];
public int[] b = new int[5];
public int[] c = new int[5];
}
public class b {
public o[] yy = new o[5];
}
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
b[] oo = new b[5];
oo[0].yy[0].a[1] = 4;
}
}
i have error:
Object reference not set to an instance of an object.
how i can solution this problem ?
best regard.