Hi I have like 50 pages of code that I should write comments to it …
Can you guys show me the best way. I meant I need you to write me a sample …
the comments should contain nearly everything (classes, constructors, attribute, methods, events, functions)
Hi I have like 50 pages of code that I should write comments to
Share
Don’t comment what is obvious like
or
There might be a good idea to explain WHY a certain code line is there. For example explain why
Needs to be invalidated.
The basic idea is: add extra information with comments and use them for explanations, don’t create redundancy and duplication.
EDIT:
You might also want to explain why each item in the toolbar needs to be unchecked here:
because is not obvious from the name of the event handler which button is clicked in order to understand why all buttons are unchecked.
A good comment would be something like: