How to create documentation using code comments

Use the regular XmlDoc tags to document your code; it’s usually enough to type /// in Visual Studio to get the default tags.

Then use SandCastle to generate documentation. It can create regular help files, but also web-based help. Remember that you have to check the “XML Documentation file” option in Visual Studio -> Project Settings -> Build -> Output.

SandCastle is not the easiest tool to work with. I usually use Sandcastle Help File Builder, which is a user-friendly GUI for Sandcastle.