How to add an xml fragment into C# Documentation Comments

G

Guest

Hi all,

I try to add an XML fragment into C# Documentation Comments like this:

/// <example>
///<code>
///<book>
/// <name>Book1</name>
///</book>
///</code>
///</example>

but it's work because the xml tags are not appear.

Anyone know how to do this?

Thanks,
ano
 
G

Guest

What are u doing?

Why do u need the XML tag? it's only preprocessor directive

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
N

Nicholas Paldino [.NET/C# MVP]

ano,

Why not use a CDATA section in the documentation? It should allow you
to put an XML fragment in that.

Also, if you want to make a reference to the List<T> class, it should be
within a <see> XML comment. There is a specific way to reference generic
types in XML comments. The documentation for the <see> tag has examples
that show you how to do it:

http://msdn2.microsoft.com/en-us/library/acd0tfbe.aspx

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top