Should you write XML comments for Interfaces, concrete implementations, or both?

You can define the comment in a separate file and then use the <include> tag (see MSDN). This way, you can write the comment just once, but include it as a documentation in multiple different places (e.g. the declaration and the implementation of an interface).

Of course, this requires a bit more discipline, because it is more difficult to write. It is also a bit less useful, because you won't see them in the source code. However, if you want to use XML comments to build documentation, then it is probably a good approach.


Prefer to comment both. Remember that the interface method definition should contain all of the information the consumer requires to either implement or call it. The implementation is relevant to consumers as well as far as choosing which one to use, so it should be appropriate to comment as well.

The bottom line is to err on the side of more clarity rather than less.