Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Documentation <example><code>...</code></example> for a class

I have a class that I would like to create a simple example on how to use. However, when I use the tag on the class declaration, the example does not appear in the Sandcastle output. It works fine for the object's members but not for the class itself. Can sandcastle handle this?

An example of what I would like to do would be.

MSDN TcpClient Documentation

This has an example on how the class would be used. How can I include such a thing for my class?

This is would I would like to do:

/// <summary> My example class </summary>
/// <example>
///   <code>
///      // Example code on how to use the class
///   </code>
/// </example>
public class MyClass
{
    public string MyString {get;set;}
}
like image 230
galford13x Avatar asked Sep 04 '12 21:09

galford13x


1 Answers

For Sandcastle, Custom tags can be created by modifying the main_sandcastle.xslt file with your own tag transform definitions. Files you would be interested in are :

transforms/main_sandcastle.xslt content/shared_content.xml

like image 157
ideafountain Avatar answered Oct 21 '22 03:10

ideafountain