I have a class that i am inheriting from and the methods i override should have the same comments as the base. Does resharper have an option to copy them?
6 Answers
In addition to the above mentioned context action, which I find fairly tedious to apply for each inherited member, you can also configure ReSharper to "pull down" comments by default when implementing a base class or interface.
To do this, from the ReSharper main menu go to Options | Code Editing | Member Generation | Other Options
inside here you will see an option to Copy XML documentation from overridden members, if you check this option ReSharper will automatically copy all inherited documentation for you.

- 1,602
- 1
- 15
- 16
-
1As of 2016.2 you can also set it to add
instead. If that's your thing. – JamesT Nov 09 '16 at 17:29
Since version 3.0 of ReSharper, you should have a context action available to do this, Copy comments from base. If it doesn't appear to be available, make sure it's checked in ReSharper | Options | Languages | C# | Context Actions
.

- 62,551
- 17
- 151
- 186
-
3This seems to be per member, is there a way to do it for all members in a class? – Ryan Burnham Aug 29 '11 at 04:27
Let your overridden methods uncommented. So R# short help (Ctrl+Shift+F1) will automatically show the help of base class member.

- 4,287
- 4
- 23
- 38
This is a duplicate of Can I propagate XML documentation from an interface to its implementation?
Answer: press Alt+Ins from each method name, choose "Copy comments from base". As accepted answer indicates, you must have this option enabled.
This is an older question, but I thought I'll add the point that resharper has support for the tag
/// <inheritdoc />
With this it the comment of the interface is also shown in the tooltip in intellisense.

- 3,619
- 5
- 24
- 60
-
Intellisense does not recognize this tag for me in Visual Studio Community 2017. – Didii Jun 29 '17 at 12:43
-
-
-
-
I just updated to the latest Resharper version (2017.1.3), it previously was 2017.1.2. I can't seem to find any related options except for adding the value. Visual Studios is Community 2017. And it seems very hard to Google... – Didii Jun 29 '17 at 15:59
-
It seems like it does not always show up. When hovering over the item, it does not show up, when going through the auto-complete it is however shown. It is however always shown here even if you do not include the `
` tag. – Didii Jun 29 '17 at 16:03 -
I built a tool to post-process the XML documentation files adding support for the <inheritdoc/> tag.
While it doesn't help with Intellisense in source code, it does allow the modified XML documentation files to be included in a NuGet package and therefore works with Intellisense in referenced NuGet packages.
Go to www.inheritdoc.io for more info (free version available).

- 478
- 5
- 14