Hi,
I have an enum, struct has one enum and a string and I have an array of struct like this in C# ---
public enum ENU : int
{
eval1=1,
eval2
}
public strut STRU //Struct has a enum and a string
{
public ENU senu;
string sstr;
public STRU (ENU cenu, string cstr) //Constructor for struct
{
senu=cenu;
sstr=cstr;
}
}
STRU stru0= new STRU(ENU.eval1, "Hello") //Create strucs as this
STRU stru1 = new STRU(ENU.eval2, "World")
//Array of struct
STRU[] arrstru= new STRU[2];
arrstru[0]=stru0;
arrstru[1]=stru1;
Till this there are no errors in the code. I want to use foreach on this array and fill the combo box with enum data. foreach is giving me errors. Can anybody help me writing foreach for this strut array?
thanks for help
newP
}