I imagine that we all (when we can be bothered!) comment our interfaces. e.g.
/// <summary>
/// Foo Interface
/// </summary>
public interface Foo
{
/// <summary>
/// Will 'bar'
/// </summary>
/// <param name="wibble">Wibble factor</param>
void Bar(string wibble);
}
Do you also comment the implementation (which may also be provided to clients, e.g. as part of a a library)? If so how do you manage keeping the two in sync? Or do you just add a 'See interface for documentation' comment?
Thanks
As a general rule, I use the same DRY (Don't Repeat Yourself) principle as with code:
Java specific: when documenting the implementation, use {@inheritDoc} tag to "include" javadocs from the interface.
For more information: