right, Basically I have
public class myClass : Object{
myObjectType object1;
myObjectType object2;
myObjectType object3;
public void Save()
{
foreach( myObjectType i in this) /// this part doesn't work
//save stuff
}
}
please help!
Loading
Vipul KelkarPosted Oct 30, 2011, 11:44 PM
you can use a foreach statement or a for loop for that matter with collections ie types that implement IEnumerable interface
so you can have an array(as vulpes has mentioned) or a List
VulpesPosted Oct 30, 2011, 4:27 PM