codeEntityReference
This is used to insert a reference to a code entity such as a type, method, property, event, field,
etc. It can be a reference to a member in one of your classes or one in the .NET Framework.
To use a code entity reference, simply insert the fully qualified member name as the inner text of
a codeEntityReference element anywhere within a topic. For methods, include the data
types of any parameters that are passed to the method. The member name should be prefixed with a code indicating
the member type:
Prefix | Description |
---|
N: | A namespace |
T: | A types such as a class, enumeration, interface, or structure |
F: | A field member |
E: | An event member |
P: | A property |
M: | A method |
To link to the root namespace container page, use the ID R:Project_[HtmlHelpName]
where "[HtmlHelpName]" is the value of your project's HTML Help Name property with
spaces replaced by underscores. Use the Entity References tool window to search for the ID if in doubt
about its value.
There are three optional attributes.
Name | Description |
---|
qualifyHint | If set to false or omitted, the link text will consist only of the member name without a
namespace or class qualifier. If set to true, type names are fully qualified with their namespace. Class
members are qualified with their class name. |
autoUpgrade | This only has purpose on method class members. If set to false or omitted, the link will
take you directly to the referenced member. If set to true and the method has overloads, the link will take you
to the method overloads page instead. If the method has no overloads, it works the same as if set to false and
it takes you to the method page. |
linkText | This can be used to override the default link text based on the member name and provide your
own link text. |
<codeEntityReference qualifyHint="true">T:System.IO.FileStream</codeEntityReference>
<codeEntityReference qualifyHint="true" autoUpgrade="true">
M:System.IO.FileStream.#ctor(System.String,System.IO.FileMode)
</codeEntityReference>
<codeEntityReference qualifyHint="true" autoUpgrade="true">
M:System.IO.FileStream.Write(System.Byte[],System.Int32,System.Int32)
</codeEntityReference>
<codeEntityReference qualifyHint="false">P:System.IO.FileStream.Length
</codeEntityReference>
<codeEntityReference qualifyHint="false" autoUpgrade="true">
M:System.IO.FileStream.Flush</codeEntityReference>
<codeEntityReference linkText="FileStream.Flush on Microsoft Docs">
M:System.IO.FileStream.Flush</codeEntityReference>