INTERFACE System.Collections.Generic.IList<MgGeometry>

public class MgGeometryCollectionEnumerator : IDisposable, System.Collections.Generic.IEnumerator<MgGeometry>
{
  public MgGeometryCollectionEnumerator(MgGeometryCollection coll)
  {
    m_coll = coll;
    m_pos = -1;
  }

  public MgGeometry Current
  {
    get
    {
      return m_coll.GetItem(m_pos);
    }
  }

  Object System.Collections.IEnumerator.Current
  {
    get
    {
      return m_coll.GetItem(m_pos);
    }
  }

  public bool MoveNext()
  {
    bool bOk = false;
    if (m_pos < m_coll.GetCount()-1)
    {
      m_pos++;
      bOk = true;
    }
  return bOk;
  }

  public void Reset()
  {
    m_pos = -1;
  }

  public void Dispose()
  {
    m_coll = null;
  }

  private MgGeometryCollection m_coll;
  private int m_pos;

}

public System.Collections.Generic.IEnumerator<MgGeometry> GetEnumerator()
{
  return new MgGeometryCollectionEnumerator(this);
}

System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
  return new MgGeometryCollectionEnumerator(this);
}

public int Count
{  
  get { return GetCount(); }
}

public bool IsReadOnly
{
  get { return false; }
}

public void CopyTo(MgGeometry[] array, int arrayIndex)
{
  for (int i=0; i<GetCount(); i++)
  {
    array[arrayIndex+i] = GetItem(i);
  }
}

public MgGeometry this[int index]
{
   get { return GetItem(index); }
   set { SetItem(index, value); }
}