GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoCollectionEnumerator Structure
Members Example
In This Topic
    GoCollectionEnumerator Structure
    In This Topic
    Iterate over all of the GoObjects in this collection, either forwards or backwards.
    Syntax
    public struct GoCollectionEnumerator : System.ValueType 
    Remarks
    Although this structure is public, it is rarely used explicitly. Instead you should use the foreach (or For Each) construct to iterate through the objects that are part of a collection.

    Remember that you must not modify the collection, by adding or removing any child objects, while you are iterating over the children. If you do, you may get an InvalidOperationException. This structure type does not support comparison for equality.

    Example
    /// In C#: In VB.NET:
    foreach (GoObject obj in aGoCollection) {
      . . .
    }
    Dim obj As GoObject
    For Each obj in aGoCollection
      . . .
    Next
    See Also