XML documentation comment question.

G

Guest

How do you reference a class constructor in a <see> or <seealso> tag?

using System;
namespace MyNamespace
{
/// <summary>
/// Does some stuff on some stuff.
/// </summary>
/// <remarks>
/// See <see cref="!!!HELP!!! WHAT DO I PUT HERE?!?!?!"/> for an example.
/// </remarks>
public class MyClass
{
/// <summary>
/// Creates an instance of <see cref="MyClass"/>.
/// </summary>
/// <example>
/// <code>
/// MyClass oClass = new MyClass();
/// </code>
/// </example>
public MyClass()
{
}
}
}
 
B

Bruce Wood

Have you tried the class name with parentheses after it?

<see cref="MyClass()"/>

I know that you can distinguish between method overloads this way:

<see cref="MyMethod()"/>

versus

<see cref="MyMethod(string)"/>

I imagine that constructors can be referenced the same way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top