Hi,
I have search long and far and tried many things and I cant seem to get this to work. I have a simplified example below.
All the examples I have found of jagged-arrays dont seem to go far enough for me.
struct MyRecord
{
public String Name;
public String Address;
public String Other;
}
MyRecord[][][] MyStruct = new MyRecord[255][][];
private void button1_Click(object sender, EventArgs e)
{
MyStruct[254][1][2].Address = "201";
}
The error i get is a NULLReferenceException unhandled. This is where I am finding it hard to pull together.
Any help will be appreciated.
I have search long and far and tried many things and I cant seem to get this to work. I have a simplified example below.
All the examples I have found of jagged-arrays dont seem to go far enough for me.
struct MyRecord
{
public String Name;
public String Address;
public String Other;
}
MyRecord[][][] MyStruct = new MyRecord[255][][];
private void button1_Click(object sender, EventArgs e)
{
MyStruct[254][1][2].Address = "201";
}
The error i get is a NULLReferenceException unhandled. This is where I am finding it hard to pull together.
Any help will be appreciated.
in case anyone is ever looking for the same thing..
struct MyRecord
{
public String Name;
public String Address;
public String Other;
}
MyRecord[, ,] MyStruct = new MyRecord[255,255 ,255];
private void button1_Click(object sender, EventArgs e)
{
MyStruct[0,0,0].Name = "201";
textBox1.Text = MyStruct[0, 0, 0].Name;
}
struct MyRecord
{
public String Name;
public String Address;
public String Other;
}
MyRecord[, ,] MyStruct = new MyRecord[255,255 ,255];
private void button1_Click(object sender, EventArgs e)
{
MyStruct[0,0,0].Name = "201";
textBox1.Text = MyStruct[0, 0, 0].Name;
}