views:

248

answers:

1

If I have these two methods

public Foo Get(string bar) { ... }
public Foo Get(int bar) { ... }

And write this piece of xml documentation on a different method

/// <summary>
/// Has a close relation to the <see cref="Get"/> methods.
/// </summary>

I get a blue squiggly under Get, saying that it is an Ambiguous reference 'Get'. which is true, but I want it to reference both. What is the correct way of doing this? Or should am I only supposed to reference a single method overload?

+6  A: 

Try

/// Has a close relation to the <see cref="Get(string)"/>  
/// and <see cref="Get(int)" /> methods.

You may need full typenames but intellisense should help as soon as you put first bracket in.

Hope that helps,

Dan

Daniel Elliott
Hm... that could get annoying if you have a lot of overloads...
Svish
Indeed! However, if you have a lot of overloads that could be a smell telling you there is a refactor in the works. Kindness, Dan
Daniel Elliott