Do you have access to the ArcObject .NET SDK? If so install it and get one of the installed samples called NAEngine, also found here:
This app shows how to use the ToolbarControl, TOCControl, and MapControl to do network analysis work. The Create Locations tool is already added to the toolbar, as is the button that opens the NAWindow.
Once there is an active analysis layer in the NAWindow and one of the barriers classes selected in the NAWindow, you can make sure the Create Location tool is selected on the toolbar. At that point, you will be able to draw barriers appropriately.
Hopefully, this gives you everything you need. At least, it is a great place to get reference code on how to program network analysis using the engine tools.