Can you please let me know how I can list all layers inside a saved .mxd map and also get list of layers inside a SDE database connection using c# and ArcObjects? For example if I have a map document like
"C:/GIS/Project.mxd" and a
sde connection to enterprise geodatabase like
"projects.sde" under database connection node, h lo w can I get access to them and list their contents?
I know how to do this using Python - ArcPy scripting like
mxd = arcpy.mapping.MapDocument(r"C:\GIS\Project.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "")
for lyr in arcpy.mapping.ListLayers(mxd, "", df):
But couldn't find a solution for ArcObject!