Search code examples
c#visual-studiocode-documentation

Viewing the "<" symbol in Visual Studio Documentation


I am writing documentation about a function in Visual Studio 2017. At some point, I need "<" symbol. It seems trivial but, the documentation hasn't been shown up. The example situation is presented below:

public interface IPersonService : IDisposable
{
    /// <summary>
    /// Procedure that returns a list of people with the given first and last name.
    /// 
    /// <para>
    /// name and surname are not case sensitive. (Friedrich Schiller == FrIedRich SCHIller)
    ///  
    /// <code>
    /// IList<Person> personList = _personService.GetList("friedrich","schiller");
    /// </code>
    /// </para>
    /// </summary>
    /// <param name="name">Name of the person being called. It cannot be null. It is not case sensitive. </param>
    /// <param name="surname">Surname of the person being called. It cannot be null. It is not case sensitive. </param>
    /// <returns>
    /// IList- Person, List of people with name and surname,
    /// list with 0 elements- If there is no person with your name and surname.
    /// </returns>
    IList<Person> GetList(string name, string surname);
}

At the code tag, because of the IList personList = _personService.GetList("friedrich","schiller"); phrase, it doesn't show anything. Whenever I deleted "<" symbols from the phrase, documentation has been shown. How can I solve this problem? Thanks in advance.


Solution

  • As Raymond Chen points out that, If I want angle brackets to appear in the text of a documentation comment, use the HTML encoding of < and >, which is &lt; and &gt; respectively.