views:

20

answers:

1

Is there a point in writing comments in code like this?

/// <Remarks>
/// Name of abc - public property.
/// </Remarks>

In visual studio, the intellisense has icons for each type of class member (field, property, etc), so I don't see the point of this. In my current shop we are only using Visual Studio anyway, which provides those icons.

Thanks

+1  A: 

Seems fairly useless to me. I'd avoid it, because, as you say, it is something that can be inferred from the code, trivially. (edit: FWIW, maybe it is useful for some tool your organisation runs to do documentation, and the tool is not smart enough to detect properties vs fields, but I doubt this is the case. Nevertheless, that is a potential reason to encode 'redundant' data into the comments (to satisfy a tool (human or not :P)).

Noon Silk
This was a task set for a fellow junior developer. What made me laugh is a coder with less experience (less age - less working experience) was getting his code commented when really it should be his own duty? The xml comments were not going to be executed to a document so what I stated would have been fine. Really strange.
dotnetdev