Finding code examples


Summary
One of the best ways to learn how to write ArcObjects code is to see examples of the code in action. This topic shows the different resources in the ArcObjects namespace reference for code examples.

In this topic


About finding code examples

To make code examples easier to find, links have been added to thousands of ArcObjects namespace reference pages. Depending on the code that is available for a particular ArcObject, there can be links to the following three types of documents — .NET snippets, .NET samples, and .NET related topics.
The links to each of these three document types is directly related to the particular ArcObjects namespace reference page you are on. For example, if you view the ESRI.ArcGIS.Geometry.IPoint.PutCoords method page, the code links at the bottom take you to documents that use that particular ArcObject method. The following screen shot shows code links for the ESRI.ArcGIS.Geometry.IPoint.PutCoords method page in the ArcObjects namespace reference:

 
Not all ArcObjects namespace reference pages have links to code examples.

.NET Snippets

Snippets for ArcGIS .NET developers are chunks of reusable code that aid programmers in performing common tasks. A thorough understanding of the available ArcGIS snippets in the ArcObjects .NET software development kit (SDK) can greatly reduce the amount of time spent coding, encourage modularity, and improve continuity. ArcGIS snippets are utilized in the Visual Basic and C# code editors in Microsoft Visual Studio. Clicking a link in the .NET snippets section opens the full ArcGIS snippet code.

.NET Samples

Samples are Visual Studio projects that contain all of the necessary code to demonstrate a certain set of ArcObjects functionality. Samples can range in complexity from performing one piece of ArcObjects functionality to a fully functioning geographic information system (GIS) application. Sample applications are typically provided in both Visual Basic .NET and C# languages. The following are the two types of links in the .NET samples section—sample readme file and individual code files within the sample.
The sample readme file link has the name of the sample. The individual code file links to the code files within the sample that use the particular ArcObject in question. See the following screen shot:

.NET Related Topics

The links for .NET related topics can be one of the following types: conceptual, how to documents that explain how to do a specific task, an overview of an assembly, or a walkthrough of the necessary steps to create a complete sample project or application. These documents can be found in various locations of the .NET SDK.
When you click a link and get directed to a new document, it can be helpful to know the location of that document in the table of contents (TOC) to access all the related topics that are around it. To locate a document in the TOC, click the Sync with Table of Contents button, which displays in the toolbar at the top of the Microsoft Document Explorer. See the following screen shot:
 


See Also:

How to use ArcGIS samples
Snippets for ArcGIS .NET developers




Development licensing Deployment licensing
ArcGIS for Desktop Basic ArcGIS for Desktop Basic
ArcGIS for Desktop Standard ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced ArcGIS for Desktop Advanced
Engine Developer Kit Engine