<summary> (JavaScript)

 

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

Specifies the description for a function or method.

<summary locid="descriptionID">description  
</summary>  

Parameters

locid
Optional. The identifier for localization information about the function or method. The identifier is either a member ID or it corresponds to the name attribute value in a message bundle defined by OpenAjax metadata. The identifier type depends on the format specified in the <loc> element.

description
Optional. A description of the function or method.

The elements used to annotate functions, which include <summary>, <param>, and <returns>, must be placed in the function body before any statements.

The following code shows how to use the <summary> element.

function areaFunction(radiusParam)  
{  
    /// <summary>Determines the area of a circle when supplied a radius parameter.</summary>  
    /// <param name="radiusParam" type="Number">The radius of the circle.</param>  
    /// <returns type="Number">The area.</returns>  
    var areaVal;  
    areaVal = Math.PI * radiusParam * radiusParam;  
    return areaVal;  
}  
  

XML Documentation Comments

Show: