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 have some code that I'd like to run on a page. My problem
A lot of these pages are like mini applications that have their own CSS
On my pages I have a table with rows that typically look like this:
I have a lot of pages that are setup like so from an old
I have a few pages on my asp.net website that I would like to
Like the title says, I have a (faulty) Regex in JavaScript, that should check
Let's say I have some Classic ASP pages that produce all output via Response.Write.
I have an code segment of view .cshtml page like : @Html.ActionLink(Add Charts of
I have an html page with a link like this: <a href=javascript:window.print()>Print QR code</a>
I have a master page in my asp.net MVC project, which has code like

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.