Christophe Debove
Christophe Debove

Reputation: 6296

Visual Studio Interface Comment inherence?

Is it possible to link a comment/doc between the method signature and its implementation.

Example :

public interface IExample
{
     /// <summary>
     /// make ... 
     /// </summary>     
     void Something();
}

public class AClass : IExample
{
    void Something()
    {
    }
}

When I mouse Over the AClass Something method I want to have the summary of the interface method signature.

Upvotes: 2

Views: 397

Answers (1)

sll
sll

Reputation: 62484

You can use see / seealso tags to reference declaration from the implementation part.

The tag lets you specify a link from within text. Use to indicate that text should be placed in a See Also section. Use the cref Attribute to create internal hyperlinks to documentation pages for code elements

interface ICommand
{
   void Execute();
}

/// <summary>
/// Represents a Concrete command, 
/// implements <see cref="ICommand" /> interface.
/// </summary>
public sealed class ConcreteCommand
{
   public void Execute()
   {
   }
}

Upvotes: 2

Related Questions