Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use inline comments to document members in .NET?

How can I document a member inline in .Net? Let me explain. Most tools that extract documentation from comments support some kind of inline documentation where you can add a brief after the member declaration. Something like:

public static string MyField; /// <summary>Information about MyField.</summary>

Is there a way to do this in C# or the .NET languages?

like image 511
Curro Avatar asked Nov 06 '08 15:11

Curro


1 Answers

No, you can't. XML comments are only supported as a block level comment, meaning it must be placed before the code element you are documenting. The common tools for extracting XML comments from .NET code do not understand how to parse inline comments like that. If you need this ability you will need to write your own parser.

like image 123
Scott Dorman Avatar answered Sep 22 '22 17:09

Scott Dorman