Stum­bled across ic#code’s free ebook ‘The fine art of com­ment­ing’ this morn­ing, it’s from 2002 but every­thing still applies, you can down­load it here.

The book cov­ers com­ment­ing in gen­eral and not just C#, but in rela­tion to C# here’s the list of the pre­de­fined xml tags you can use in com­ments (some­thing I have to search every time..):

<c> Marks a part of a com­ment to be for­mat­ted as code
<code> As above, but multiline
<exam­ple> For embed­ding exam­ples in com­ments, usu­ally uses <c>
<excep­tion>* Doc­u­ments an Excep­tion class
<include>* Includes doc­u­men­ta­tion from other files
<list> A list of <term>s defined by <description>s
<para> Struc­tures text blocks, e.g. in a <remark>
<param>* Describes a method parameter
<paramref>* Indi­cates that a word is used as ref­er­ence to a parameter
<per­mis­sion>* Gives the access per­mis­sions to a member
<remarks> For overview of what a given class or other type does
<returns> Descrip­tion of the return value
<see>* Refers to a mem­ber or field available
<seealso>* As above, but dis­plays a ‘See also’ section
<sum­mary> A sum­mary of the object
<value> Describes a property

* val­i­dated by the C# compiler

Share

Leave a Reply