Groups | Blog | Home
all groups > c# > december 2005 >

c# : XML Documentation in .NET 2.0 and <see...> links to overloaded methods


Lasse_Vågsæther_Karlsen
12/1/2005 11:42:16 PM
If I got the following three methods:

/// <summary>
/// Tests the string.
/// </summary>
/// <param name="s">
/// The string to test.
/// </param>
public void Test(String s)
{
}

/// <summary>
/// Tests the integer.
/// </summary>
/// <param name="i">
/// The integer to test.
/// </param>
public void Test(Int32 i)
{
}

/// <summary>
/// Performs a simple test.
/// </summary>
/// <remarks>
/// Also, see <see cref="Test"/> for more information. ----------- here!
/// </remarks>
public void Test2()
{
}

and then compiles this I get:

D:\Dev\VS.NET\DocumentationTest1\DocumentationTest1\GenericClass1.cs(59,34):
warning CS0419: Ambiguous reference in cref attribute: 'Test'. Assuming
'DocumentationTest1.GenericClass1.Test(string)', but could have also
matched other overloads including
'DocumentationTest1.GenericClass1.Test(int)'.

Is there a way to make a link that refers to the overloaded method list?
Using NDoc I can easily output such a page that contains links to the
specific versionf of the overload method.

--
Lasse Vågsæther Karlsen
http://usinglvkblog.blogspot.com/
mailto:lasse@vkarlsen.no
Christoph Nahr
12/2/2005 10:16:49 AM
On Thu, 01 Dec 2005 23:42:16 +0100, Lasse Vågsæther Karlsen
[quoted text, click to view]

You already found it. The link works fine, it's just that the
compiler warning is stupid. Add compiler warning 0419 to your list of
ignored warnings (in the project settings).
--
AddThis Social Bookmark Button