Share via


<typeparam> (C# Programming Guide)

<typeparam name="name">description</typeparam>

Parameters

  • name
    The name of the type parameter. Enclose the name in double quotation marks (" ").

  • description
    A description for the type parameter.

Remarks

The <typeparam> tag should be used in the comment for a generic type or method declaration to describe a type parameter. Add a tag for each type parameter of the generic type or method.

For more information, see Generics (C# Programming Guide).

The text for the <typeparam> tag will be displayed in IntelliSense, the Object Browser code comment web report.

Compile with /doc to process documentation comments to a file.

Example

// compile with: /doc:DocFileName.xml  

/// comment for class 
public class TestClass
{
    /// <summary> 
    /// Creates a new array of arbitrary type <typeparamref name="T"/>
    /// </summary> 
    /// <typeparam name="T">The element type of the array</typeparam>
    public static T[] mkArray<T>(int n)
    {
        return new T[n];
    }
}

See Also

Concepts

C# Programming Guide

Reference

Recommended Tags for Documentation Comments (C# Programming Guide)

Other Resources

C# Reference

Change History

Date

History

Reason

July 2009

Added an example.

Customer feedback.