What XML comment tags are supported in the Object Browser
Asked Answered
C

2

5

I'd like to provide a higher level of detail at the class level (in this case actually a Module) with code samples, etc., but I'm having trouble getting various tags to work.

''' <summary>
''' Here's a summary of <c>SmallCodeChunk</c>
''' </summary>
''' <example>
'''   Mmm, Skynet?
'''   <code>
'''      code.CodingItself("that's so meta!")
'''   </code>
''' </example>
''' <remarks>
'''   <para>Unit testable by replacing the <see cref="Implementation"/> property 
'''         with a mocked/stubbed <see cref="IThingy"/>.
'''   </para>
'''   <para>Paragraph of a bunch of stuff. <c>Y</c> is used for <c>True</c> just
'''         for the sake of making the universe a (not) better place.
'''   </para>
''' </remarks>

I realize that some of the tags used (like <exception>) probably aren't really valid, but it seems like I should be able to do things like <example>. And I'd expect some sort of formatting (monospace font maybe?) for <c> tags.

If I'm not doing anything wrong, is there a subset of XML doc tags that are supported for display in the Object Browser?

Couloir answered 5/6, 2013 at 19:28 Comment(0)
K
6

According to a 2009 article in MSDN Magazine:

Object Browser displays summary, param, return, remarks, typeparam, and exception comments when they exist.

A 2006 post on the MSDN Blogs adds see and seealso to that list.

Krawczyk answered 21/6, 2013 at 16:34 Comment(2)
Thanks, but very interesting that a post from 2006 can add something to a list of 2009, I expect that it's the other way round :).Craal
@Sebastian: The 2009 article simply missed a couple of tags from the 2006 blog post. :)Krawczyk
E
3

Here is a list of the "recommended" tags to use: http://msdn.microsoft.com/en-us/library/ms172653(v=vs.80).aspx

In short they are:

<c>
<code>
<example>
<exception> *
<include> *
<list>
<para>
<param> *
<paramref>
<permission> *
<remarks>
<returns>
<see> *
<seealso> *
<summary>
<typeparam> *
<value>

where '*' denotes tags for which the compiler verifies syntax. And here is a short article with some additional how to's and examples:

http://msdn.microsoft.com/en-us/magazine/dd722812.aspx

Ellora answered 14/6, 2013 at 18:55 Comment(1)
Doesn't quite answer my question of which of tags are valid and respected with in Visual Studio 2010's Object Browser.Couloir

© 2022 - 2024 — McMap. All rights reserved.