Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 529539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:06:09+00:00 2026-05-13T09:06:09+00:00

Hi I have like 50 pages of code that I should write comments to

  • 0

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)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:06:09+00:00Added an answer on May 13, 2026 at 9:06 am

    Don’t comment what is obvious like

    //The width of the line is 2
    lineWidth = 2;
    

    or

    //Clones the snapshot
    tempDraw = (Bitmap)snapshot.Clone();
    

    There might be a good idea to explain WHY a certain code line is there. For example explain why

    panel1.Invalidate();
    

    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:

    private void toolStripButton1_Click(object sender, EventArgs e)
    {
        foreach (ToolStripButton btn in toolStrip1.Items)
        {
            btn.Checked = false;
        }
    ...
    }
    

    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:

    private void toolStripButton1_Click(object sender, EventArgs e)
    {
        //Deselect all previously applied filters because the user clicked "disable all",
        //which removes the effects of all filters and we want to show this the the user
        foreach (ToolStripButton btn in toolStrip1.Items)
        {
            btn.Checked = false;
        }
    ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm programming in PHP and would like to create web pages which have email
I'd like to have a page in php that normally displays information based on
I would like to have an aspx page that contains something like.... <form id=form1
I have a page that is accessed via a URL like this: http://power-coder.net/Test/something.php?id=3#Page1 I
I have three tables: page, attachment, page-attachment I have data like this: page ID
I'd like to have an HTML page which displays a single PNG or JPEG
I have a page which work like a navigation and a iframe in this
I have a page where I would like it to remain static after refresh
I have a drop down like this on my page: <p> <%= f.label :episode_id
I have a software diagnostic page on which I would like to list the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.