From Java and Eclipse I'm used to @inheritDoc
that allows to use the same documentation as in the base class/method.
How can I accomplish something similar in C# and Visual Studio 2010?
The @inheritdoc tag indicates that a symbol should inherit its documentation from its parent class. Any other tags that you include in the JSDoc comment will be ignored. This tag is provided for compatibility with Closure Compiler.
The cref attribute in an XML documentation tag means "code reference." It specifies that the inner text of the tag is a code element, such as a type, method, or property.
The first rule for commenting is it should have /// three slash for comments as C# supports C++ style commenting so commenting can be done by // -- two slashes -- but for Documentation /// is necessary. We will go through each one by one. You can add a paragraph to the description by using <para> tag.
From the menu bar, choose Tools > Options to open the Options dialog box. Then, navigate to Text Editor > C# (or Visual Basic) > Advanced. In the Editor Help section, look for the Generate XML documentation comments option.
Even this question is a few years old and it was specifically for Visual Studio 2010. For all those that land here by Google, I would like to add an answer that I found and that holds true for Visual Studio 2015 in combination with Sandcastle Help File Builder (SHFB):
/// <inheritdoc/>
can be used to inherit the docs from a base class or an interface.
Here a link to the Sandcastle Help File Builder (SHFB) documentation: Using the <inheritdoc /> Tag
It doesn't exist in vanilla VS. Your best bet is ghostdoc or similar. This is available in the Extension Manager, or here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With