INTERFACE System.Collections.Generic.IList<MgMapPlot>

public class MgMapPlotCollectionEnumerator : IDisposable, System.Collections.Generic.IEnumerator<MgMapPlot>
{
  public MgMapPlotCollectionEnumerator(MgMapPlotCollection coll)
  {
    m_coll = coll;
    m_pos = -1;
  }

  public MgMapPlot 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 MgMapPlotCollection m_coll;
  private int m_pos;

}

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

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

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

public bool IsReadOnly
{
  get { return false; }
}

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

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