Suppose I have a method as follows:
/// <summary>
/// Here I want to reference the parameter <see cref="personId"/>.
/// </summary>
/// <param name="personId">
/// The person id.
/// </param>
/// <returns>
/// The <see cref="Person"/>.
/// </returns>
public Person GetPerson(int personId)
{
}
When I publish my XML documentation using Sandcastle, the cref:
<see cref="personId"/>
gets converted to [!:personId].
The warning in Sandcastle is:
Unknown reference link target
Any advice?
To insert XML comments for a code element Type /// in C#, or ''' in Visual Basic.
Extensible Markup Language (XML) is a markup language used to describe the content and structure of data in a document. It is a simplified version of Standard Generalized Markup Language (SGML). XML is an industry standard for delivering content on the Internet.
The first rule for commenting is it should have /// three slash for comments as C# supports C++ style commenting so commenting can be done by // -- two slashes -- but for Documentation /// is necessary. We will go through each one by one. You can add a paragraph to the description by using <para> tag.
XML documentation comments - document APIs using /// comments | Microsoft Docs.
Use <paramref>
<paramref name="personId"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With