Edhy right on the money, as usual.
Here is the C# code you might use.
Sample #1: Looping through a BO dropped on a form. Assume you have a BO you've built called MySpecialBO. You've dropped an instance on a form and the instance is named MySpecialBO1.
foreach(MySpecialBO boRow in this.MySpecialBO1.GetEnumerable())
{
//-- Do something with boRow. Each loop will move it to next row in data table,
// only you can use the strongly typed properties to access data.
}
Sample #2: Looping through the BO within the BO itself. We'll use MySpecialBO again, but this time we're doing this inside an instance method.
foreach(MySpecialBO boRow in this.GetEnumerable())
{
//-- Do something with boRow. Each loop will move it to next row in data table,
// only you can use the strongly typed properties to access data.
}