Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show generic types in C# XML summary

/// <summary>
/// Something about this generic method which works with ??? type.
/// </summary>
/// <typeparam name="T">∙∙∙</typeparam>
/// <returns></returns>
public T Foo<T>()
{
    ∙∙∙
}

Is it possible to write a comment in the summary tag to show current given generic type. (as visual-studio does)?

(e.g. We can see Something about this generic method which works with string type. in the tooltip of Foo<string>())

like image 449
Mehdi Avatar asked Oct 21 '22 13:10

Mehdi


1 Answers

this tag should do this <typeparamref name="T"/>

Recommended Tags for Documentation Comments (C# Programming Guide)

like image 155
outcoldman Avatar answered Oct 24 '22 13:10

outcoldman