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

  • SEARCH
  • Home
  • 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 846583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:38:15+00:00 2026-05-15T06:38:15+00:00

Depending on the feedback I get, I might raise this standard with my colleagues.

  • 0

Depending on the feedback I get, I might raise this “standard” with my colleagues. This might become a custom StyleCop rule. is there one written already?

So, Stylecop already dictates this for summary, param, and return documentation tags.

Do you think it makes sense to demand the same from comments?

On related note: if a comment is already long, then should it be written as a proper sentence?

For example (perhaps I tried too hard to illustrate a bad comment):

//if exception quit

vs.

// If an exception occurred, then quit.

If figured – most of the time, if one bothers to write a comment, then it might as well be informative. Consider these two samples:

//if exception quit
if (exc != null)
{
    Application.Exit(-1);
}

and

// If an exception occurred, then quit.
if (exc != null)
{
    Application.Exit(-1);
}

Arguably, one does not need a comment at all, but since one is provided, I would think that the second one is better.

Please back up your opinion. Do you have a good reference for the art of commenting, particularly if it relates to .Net?

Thanks.

  • 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-15T06:38:16+00:00Added an answer on May 15, 2026 at 6:38 am

    I often write comments that are simply meant to help me find sections of code. (I also use regions for this.) For example:

    // SERVER

    Because the IDE colorizes comments, it makes it handy at times to have short comments like this to assist in mentally blocking things into segments. I usually do this for only a dozen or so lines of code. If it’s longer, then a #region seems better.

    I also often write notes in my comments, sometimes as a reference for myself like this:

    // NOTE: -273.15 is absolute zero in °C, used for a MinValue below

    It’s not a grammatically beautiful or complete sentence, but it makes sense.

    Where I tend to use more complete, structured sentences is in the summary of my methods, like this:

    /// <summary>
    /// Populates the properties of a Sensor object based on
    /// the XML components of its data file.
    /// </summary>
    

    Those I feel are more likely to be read by someone else and it helps to have verbosity and clean formatting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to get some feedback on this idea, as I can see
This came up during one of our retrospectives and wanted some additional feedback and
Depending on how I map my linq queries to my domain objects, I get
This is somehow subjective depending on the target translation language, but bear with me
I've received Mixed responses on this depending what walk-through I read, I've defined a
I am new to LINQ and am trying to sort this one out. I
This is mostly a request for comments if there is a reason I should
I have three depending selects. First one, have some values. <select id=first> <option value=1>v1</option>
Depending on some conditions, different background images are loaded: $('body').css('background','url(image.png)'); Is there a way
I have different layouts depending on the user. This triggers the following error: Multiple

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.