简体   繁体   中英

Reference generic parameter in C# xml documentation comment

How do I correctly reference the overloaded method with generic parameter in c# documentation comment? What should I put into cref attribute? I want Visual Studio 2010 (and ReSharper) to resolve it correctly.

/// <summary>
/// <see cref="MethodName(IEnumerable<string>)"/>
/// </summary>
public class ClassName
{

    public void MethodName(IEnumerable<string> param)
    {
        // code 
    }

    public void MethodName(string param)
    {
        // code 
    }
}

I did not find answer in this article (even though i could have missed it). https://msdn.microsoft.com/en-us/library/fsbx0t7x.aspx

With CodingK0ala's link I finally were able to resolve it, even though I looked in the article before and did not find the answer then.

<see cref="MethodName(IEnumerable{string})"/>

Thanks.

EDIT: Actually I don't know what seemed so incomprehensible about it then. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM