I have a C# .NET application referencing ArcGIS Engine 10.2.
The last line of this fragment of code causes a COM Exception:
gridLayer = new FeatureLayerClass();
gridLayer.FeatureClass = layersFeatureWorkspace.OpenFeatureClass(layerName);
gridLayer.Name = "Density Grid";
gridLayer.Cached = true;
gridLayer.Selectable = true;
gridLayer.ShowTips = true;
gridLayer.DisplayField = "NumEvents"; // Causes COM exception immediately!
The COM error code is -2147467259
, which doesn't appear in this list of error ranges: http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//0001000002zz000000
What is going on here and how can I resolve the issue?