codeEntityReference

Sandcastle MAML

Collapse image Expand Image Copy image CopyHover image

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.

Usage

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

There are two 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.

Example

  Copy imageCopy
<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>

Example Output

See Also