Overloaded constructor links

Topics: User Forum
Mar 3, 2008 at 8:11 PM
Is it possible to insert a link in additional content to a specific overload of a constructor? I tried this:

<see cref="M:MyNamespace.MyClass.#ctor(int param1, double param2)">

but it doesn't work. If I do this:

<see cref="M:MyNamespace.MyClass.#ctor">

It takes me to the first overload.

Thanks.
Mar 3, 2008 at 9:37 PM
I think I found the problem... the parameter types need to be fully qualified with namespaces (the overly simplified example above doesn't illustrate the actual case I had tried.)

I figured this out by peeking inside reflection.xml.



allancady wrote:
Is it possible to insert a link in additional content to a specific overload of a constructor? I tried this:

<see cref="M:MyNamespace.MyClass.#ctor(int param1, double param2)">

but it doesn't work. If I do this:

<see cref="M:MyNamespace.MyClass.#ctor">

It takes me to the first overload.

Thanks.


Coordinator
Mar 3, 2008 at 11:02 PM
When they appear in code, the compiler converts stuff like "int" to the fully qualified name such as "System.Int32". In additional content, they need to be fully qualified. In the absence of parameters, SHFB will use the first one it finds if there are multiple matches.

Eric