Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to create a feature layer from a layer (.lyr) file and add it to my ArcGIS map document programmatically. I am using C# and ArcGIS.

I have a layer file and a shapefile.

share|improve this question
up vote 4 down vote accepted

There's a snippet for this in the ArcObjects .NET SDK: Add Layer File to ActiveView Snippet

share|improve this answer
to use this we have to add reference of ESRI Catalog UI Object Library in visual studios project. – AndroidLearner Oct 19 '12 at 12:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.