The <include> tag lets you refer to comments in another file that describe the types and members in your source code.
<include file='filename' path='tagpath[@name="id"]' />
where:
All Types and Members.
This is an alternative to placing documentation comments directly in your source code file.
The <include> tag uses the XML XPath syntax. Refer to XPath documentation for ways to customize your <include> use.
This is a multi-file example. The first file, which uses <include>, is listed below:
[C#] /// <include file='xml_include_tag.doc' path='MyDocs/MyMembers[@name="test"]/*' /> class Test { public static void Main() { } } /// <include file='xml_include_tag.doc' path='MyDocs/MyMembers[@name="test2"]/*' /> class Test2 { public void Test() { } }
The second file, xml_include_tag.doc, contains the following documentation comments:
<MyDocs> <MyMembers name="test"> <summary> The summary for this type. </summary> </MyMembers> <MyMembers name="test2"> <summary> The summary for this other type. </summary> </MyMembers> </MyDocs>
<?xml version="1.0"?> <doc> <assembly> <name>t2</name> </assembly> <members> <member name="T:Test"> <summary> The summary for this type. </summary> </member> <member name="T:Test2"> <summary> The summary for this other type. </summary> </member> </members> </doc>
Tag Usage | NDoc Tags | Microsoft's definition
NDoc development is hosted by |