C# Developers' Journal (original) (raw)

5:26p

Traversing a "Pages" Collection

Okay, I feel really stupid.

How do you traverse a Pages Collection? I know that it's indexed by using Pages[i], but this Pages[] is a Collection, not a System.Array, so how do I get the Lower Bound and Upper Bound indices?

I can traverse by getting the Page Names and getting at it that way, but for various reasons, I need to loop through by the Page Number.

I have a hack right now, but I don't like it and I feel like there has to be a "proper" way of doing it.