I'm just looking at acdbmgd.dll (16.2.54.0) and there doesn't seem yet to be any implementation of the System.Collections.IEnumerator interface. Access to any kind of collection is bound to be a bit strange prior to R2007.
Can you post a small example of the difference in accessing a collection 2007 and after.
Sorry, I am wrong: AutoCAD R2006 does implement System.Collections.IEnumerator, but not in a type-safe way.
Its Current property always returns System.Object. So that you were responsible to cast it to its proper type when iterationg over it,
either in a foreach loop or when doing fancy stuff with the Enumerator itself. On top of this you weren't able to release the Enumerator's resources when done with it, lacking a Dispose() method.
Minimal example, which I can't test, since 2006's licence expired a long time ago:
[CommandMethod("Foo")]
public void Foo(){
Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
Editor ed = doc.Editor;
using (Transaction tr = db.TransactionManager.StartTransaction()){
BlockTable bt = (BlockTable)tr.GetObject(db.BlockTableId, OpenMode.ForRead);
System.Collections.IEnumerator en = bt.GetEnumerator();
// using((System.IDisposable)en) // Won't work with 2006
while (en.MoveNext())
ed.WriteMessage("\n{0} ", en.Current.GetType().ToString());
foreach (var x in bt)
ed.WriteMessage("\n{0} ", x.GetType().ToString());
tr.Commit();
}
}
Should print System.Object under 2006, Autodesk.AutoCAD.DatabaseServices.ObjectId later.
Regards