Hi again. I store structures in a structure that contains object arrays. Now I send the data within that structure of objects(I'm doing this because it's either send 50 things or five with the double structure) to another form. My question is how do I retrieve the information from the very first structure.
Here is an example:
CODE
public struct Troops
{
public object[] Regiments;
}
public struct RegimentOne
{
public string General1;
public string General2;
public string General3;
public string General4;
//etc, etc, etc...and no i don't know if thats correct army groups or whatever you get what i mean
public string troop1;
public string troop2;
public string troop3;
public string troop4;
public string troop5;
///etc, etc, etc...
}
// etc, etc, etc...
//now i send all the regiment structures to the army structure
public void Army()
{
Troops army = new Troops();
army.Regiments = new object[] { *all my declared regiments in here };
}
//now i send the objects in the army structure to another form
public void button1_click(object sender, EventArgs e){
Form2 frm2 = new Form2(army.Regiment);
frm2.Show();
this.Hide();
}
So how do I pull the something like 'string troop4' from regimentOne out of the object? Much appreciation.
This post has been edited by Mastergeek666: 28 Jun, 2009 - 06:40 PM