I am triyng to access the FullName property of IDataset, but FullName is always null (incidentsDataset.FullName below)
Here is the code I'm using:
IMxDocument mxdoc = ArcMap.Application.Document as IMxDocument;
IMap map = mxdoc.FocusMap;
IEnumLayer enumLayer = map.Layers;
ILayer layer = enumLayer.Next();
IFeatureLayer2 incidentsFLayer = null;
while (layer != null)
{
if (layer.Name == "Incidents" && layer is IFeatureLayer2)
{
incidentsFLayer = layer as IFeatureLayer2;
}
layer = enumLayer.Next();
}
IFeatureClass incidentsFC = incidentsFLayer.FeatureClass as IFeatureClass;
IDataset incidentsDataset = incidentsFC as IDataset;
IFeatureClassName incidentsFCName = incidentsDataset.FullName as IFeatureClassName;Thanks.