0

Do you comment overridden methods?

This is a general question, so forgive me if it isn't a 100% fit for Stackoverflow. I can't seem to find any information or examples on this on the internet apart from this similar SO question: How to comment/document an override in C#?

Example:

/// <summary>
/// Updates this sample code.
/// </summary>
public virtual void Update()
{
    // do something
}

/// <summary>
/// Do you put a comment here?
/// </summary>
public override void Update()
{   
    base.Update()
    // do something else here
}
Alex Guerin
  • 2,336
  • 10
  • 36
  • 53

1 Answers1

0

You should document what your method does and if the implementation has any peculiarity, then you should comment that. I personally find it that the more commenting the better - makes it easier for the next person to debug.

vs97
  • 5,765
  • 3
  • 28
  • 41