Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Java developers use Javadoc in order to write inline documentation in their comments. What are the alternatives for .net - specifically c# and VB.net that people actually use in real world projects?

share|improve this question

closed as not constructive by Jim G., Joris Timmermans, gnat, Walter, MichaelT May 7 '13 at 12:49

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

We're using Sandcastle at my firm to create documentation from those xml comments. –  Carra Jan 12 '11 at 18:50

3 Answers 3

up vote 24 down vote accepted

Check out XML Comments for VB.Net and C#

XML comments for Visual Basic were first introduced in Visual Studio 2005. They can be used to create a documentation file for the project, and provide a rich development environment experience for yourself, your teammates, or other people using your code...

...XML comments can be used to document almost all definitions except namespaces. This includes types (Class, Module, Interface, Structure, Enum, Delegate), fields (Dim), properties (Property), events (Event), and methods (Sub, Function, Declare, Operator). XML comments are inserted inline, directly in your source code. This makes it easier to keep them up to date as the code evolves...

share|improve this answer
/// above a C# method or property and ''' above a VB method or property is the shortcut for this. –  StuperUser Jan 13 '11 at 17:57
would you mind explaining more on what it does and why do you recommend it as answering the question asked? "Link-only answers" are not quite welcome at Stack Exchange –  gnat May 3 '13 at 16:48
I'm pretty sure the 2+ years and 16 upvotes disagrees with you. I do welcome you to update my response if you like but the linked post is very detailed and explains the usage and advantages. –  Matthew Whited May 6 '13 at 16:23

Sandcastle supported by Sandcastle Help File Builder - both found on Microsoft's CodePlex site.

A while back I was tasked with replacing our company's previous build-time documentation generation using NDoc (now deceased). Sandcastle was the proposed new method. After researching it, I found that Sandcastle is a mess of utilities produced by Microsoft to generate documentation. Trying to implement those utilities on their own is a nightmare.

Sandcastle Help File Builder is an incredibly useful layer that uses the Sandcastle utilities but makes the creation of a documentation project a million times easier. The developer behind it has been very responsive in the CodePlex forums when I've requested help.

It provides a GUI for configuring your project and produces a project file that is compatible with MSBuild. I set ours up to generate the SHFB project on the fly, run it with MSBuild, and output to our internal API web server. Works great.

share|improve this answer

There is a very good explanation of how to use XML Comments and Sandcastle (and a nice wallchart too) here http://www.simple-talk.com/dotnet/.net-tools/taming-sandcastle-a-.net-programmers-guide-to-documenting-your-code/

share|improve this answer
That's a great resource. Wish I had had it when I was using Sandcastle! It wasn't written then. –  Michael K Jan 13 '11 at 17:42
would you mind explaining more on what it does and why do you recommend it as answering the question asked? "Link-only answers" are not quite welcome at Stack Exchange –  gnat Oct 25 '13 at 21:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.