Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

<typeparamref> (C# Programming Guide)

<typeparamref name="name"/>

name

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

For more information on type parameters in generic types and methods, see Generics.

Use this tag to enable consumers of the documentation file to format the word in some distinct way, for example in italics.

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

// 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];
    }
}

Community Additions

ADD
Show:
© 2015 Microsoft