Repository for Ideas & Research
Open Source GIS, Hydrologic Modeling, Optimization

How to get the full path to a feature class using ArcObjects

IWorkspace ws;
string fullPath;

ws = ((IDataset)yourFeatureClass).Workspace;

fullPath = System.IO.Path.Combine(ws.PathName,
    yourFeatureClass.AliasName + ws.WorkspaceFactory is ShapefileWorkspaceFactoryClass ? ".shp" : ""));