2007-09-21

How to write xml comments in c#

My prefered way to write XML comments in C# is to write the first sentence on the first row like this:

/// This method does nothing.
///

public void Foo()
{
    //NOP.
}

because when one folds the code (ctrl-m-o) one can see the first row like this:

/// This method does nothing. ...
public void Foo() ...

This is not an issue in vbnet.

To create a document out of this use Sandcastle which takes over after nDoc which is discontinued.

No comments: