Sometimes there is a need for long comments. This can happen when there is a clumsy hack that needs a long explanation. Yes, it’s better to avoid / fix the hack altogether, but often there is pressure over time, and you need to push it into the future. If so, then a detailed comment is very useful, including those who will replace the hack with better code. The key is to make sure they understand exactly what the hack is doing and why.
Often a few paragraphs are required. A comment would be more readable if empty comments such as //. However StyleCop, we don’t like it, and we generally agree with this, therefore we try to adhere to all his suggestions. Now I can present three options:
(I don’t like the first one because I usually use double / triple / quadruple comments for commenting sections of code).
(I don't like the second option, I think it looks dumb)
(I also do not like the third option. It is well suited for documentation on the method ///, but here it looks somehow out of place.
Please suggest a better way.
source
share