Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Do I Copy Comments When Generating an Interface From a Class In Visual Studio?

In Visual Studio I can use the Refactor -> Extract Interface... option to generate an interface from public methods on a class. However this does not copy across the XML comments and I end up spending several minutes copying and pasting them. Are there any macros or add-ins that can use the existing comments on the class when auto creating an interface?

like image 529
James Avatar asked Mar 31 '11 13:03

James


2 Answers

Have you tried using ReSharper?

When I extracted an interface using ReSharper, the XML comments on the extracted methods were preserved.

like image 117
bcpettifer Avatar answered Sep 28 '22 05:09

bcpettifer


The GhostDoc addin will probably help you out here.

like image 23
Dan Puzey Avatar answered Sep 28 '22 07:09

Dan Puzey