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!
Foreach and custom objects
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Oct 30, 2011, 12:27 PM EDT
Vipul KelkarRank #1,061 · 1.8K reputationPosted Oct 30, 2011, 7:44 PM EDT
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