XML documentation comment question.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dlgproc

    XML documentation comment question.

    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()
    {
    }
    }
    }

  • Bruce Wood

    #2
    Re: XML documentation comment question.

    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.

    Comment

    • dlgproc

      #3
      Re: XML documentation comment question.

      That worked. Thanks.

      "Bruce Wood" wrote:
      [color=blue]
      > 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.
      >
      >[/color]

      Comment

      Working...