See
How to use ArcGIS samples
for help on compiling, setting up the debugger, and running the sample.
If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders.
However, you will need to update the sample to point to the location of the data once you have extracted all the files.
Open and compile the sample project in Visual Studio. If necessary, set up a debug application.
Start ArcCatalog, ArcMap, ArcScene, or ArcGlobe (this sample works in any of these applications).
Create or open a document. If you are debugging, select the Output Window in Visual Studio where the SimpleExtension class prints debugging information, which indicates it is listening to document events.
Click the Customize menu, and click Extensions. The Extension Manager dialog box opens.
Select one of the sample extensions to view its associated description shown at the bottom of the dialog box.
Verify the product license your application is running against and select the appropriate sample extension on the dialog box. For example, if you are running an ArcInfo license, select ArcInfo Extension (C#) or ArcInfo Extension (VB .NET) from the list; extension checking will be successful, therefore, you can check the extension off.
If you check the other product extension on, an error similar to the standard ArcGIS extensions appears, indicating it is unavailable.
Close, then open the Extension Manager dialog box. The License not available message appears next to the extensions that you did not enable.