During development of ArcGis AddIn I've found strange behaviour of MapSelection when there are a lot of selected features. When I tryed to get selected features I've received duplicate features. So the code below throws an exception "Key already exist" . I have no idea why this happens and how to fix it. Can anybody hekp me?
IEnumFeature enumFeat = (IEnumFeature) ArcMap.Document.FocusMap.FeatureSelection;
IEnumFeatureSetup enumSetup = (IEnumFeatureSetup)enumFeat;
enumSetup.AllFields = true;
enumFeat.Reset();
IDictionary<int, int> dicIds = new Dictionary<int, int>();
while ((feat = enumFeat.Next()) != null)
{
dicIds.Add(feat.OID, num);
}

