Say I have a collection of things that can be accessed with `TheCollection.GetByID(long)`, but there's no way for me to get the length of the thing in advance. I'd like to set up a while loop to go through each one.

Clearly I could do something like this:

```
var iter = 0; var thing = TheCollection.GetByID(iter);
while (thing != null) {
    dealWithTheThing(thing);
    iter++;
    thing = TheCollection.GetByID(iter);
}

```

But I'd prefer to tidy it up by putting the modifications in the constructor, and be able to get something like this:

```
var iter = 0; var thing;
while ((thing = TheCollection.GetByID(iter++)) != null) {
    dealWithTheThing(thing);
}

```

Is this, or something like it, possible?