I want to get all features from a feature class and add them to a list. And I have noticed that the iteration using the cursor is just so slow. Does anyone have a better way of getting all values back and populating a list with them. I want the list of all features, but the loop is just so slow. It is taking like 8 seconds to populate the list with 300 features
List<IFeature> featureList = new List<IFeature>();
//Run the filter on the Feature class and get the intersection
IFeatureCursor fc = featureClass.Search(null, false);
IFeature feature;
//SLOW PART STARTS HERE
while ((feature = fc.NextFeature()) != null)
{
featureList.Add(feature);
}