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.
Build the solution in Visual Studio.
Start ArcMap.
Click Customize and click Extensions. The Extensions dialog box opens.
Check the Enforcing Diagram Name extension in the language you're using (VB .NET or C#), then close the Extensions dialog box.
Generate a new schematic diagram. The generated diagram is prefixed by the user name.