Search code examples
c#xml-documentation

XML Tags For Warnings/Important Comments When Documenting C# Code


Are there any xml tags recognised by any official C# documentation (and recognised by IntelliSense) that are used exclusively for content that serves as a warning or very important information regarding the use a class or method etc?

Failing that, what is the best way of documenting a warning or important information in XML comments?


Solution

  • It doesn't seem that there is any specific dedicated tag for doing this. In the few instances that I've needed to add warnings/important comments to methods, I used the remarks tag e.g.

    /// <summary>
    /// General info on the method
    /// </summary>
    /// <remarks>WARNING: Important information on the method</remarks>
    public void Method()
    {
        // Method content
    }