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 864113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:25:20+00:00 2026-05-15T09:25:20+00:00

This is not a biggie at all, but something that would be very helpful

  • 0

This is not a biggie at all, but something that would be very helpful indeed if resolved.

When I’m overloading methods etc there are times when the xml comments are exactly the same, bar 1 or 2 param names. I have to copy/paste the comments down to each overloaded method, where they are the same. Sometimes, however, this can cause misleading information about the method if I update one of them and forget to go back and copy/paste them to all others. If there are alot of overloaded methods, this can be very time consuming and prone to error.

So I’m wondering if there is a way of storing comments in one place (like a variable), which I can simply reference instead. This way, one change will be reflected across all related commetns.

Here’s an example:

    /// <summary>
    /// Go and do something
    /// </summary>
    public void DoSomething()
    {
        DoSomething(true, "Done something");
    }

    /// <summary>
    /// Go and do something
    /// </summary>
    /// <param name="doIt">whether it should be done or not</param>
    public void DoSomething(bool doIt)
    {
        DoSomething(doIt, "Done something");
    }

    /// <summary>
    /// Go and do something cool
    /// </summary>
    /// <param name="doIt">whether it should be done or not</param>
    /// <param name="doneMessage">message to show once done</param>
    public void DoSomething(bool doIt, string doneMessage)
    {
        if (doIt)
            Console.WriteLine(doneMessage);
    }

So as you can see, all of the comments are the same except I decided to make a correction on the last one to read ‘Go and do something cool’. Now i’ll have to go and change this is all the other method comments too.

Cheers.

  • 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-15T09:25:21+00:00Added an answer on May 15, 2026 at 9:25 am

    According to these specifications:

    http://msdn.microsoft.com/en-us/library/5ast78ax.aspx

    There is no set standard for XML comments; the ones shown on that page are just “recommended”. In the recommended tags, there is no such feature. However, the XML documentation tool happily accepts the following with no warning:

    /// <summary id="30">foo</summary>
    void bar();
    
    /// <summary id="30"/>
    void bar(int baz);
    

    Whether this is useful to you or not depends on what exactly you do with the XML file that the compiler spits out. Unfortunately, things like Intellisense (code completion and in-IDE tooltips, etc). won’t do anything with it.

    EDIT: Try out <include>, as described in http://msdn.microsoft.com/en-us/library/9h8dy30z.aspx . It’s a bit heavyweight, because it requires a separate file, but if your documentation is enormous it could be worth it.

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

Sidebar

Related Questions

I know this not actually a developer question, but I am hoping that I
This not a programming question but Most of the programmers using Eclipse should have
So why is this not working? I'm creating a regex that will match a
I want to know i can do something similar to this (not working) code
This is not 100% programming related. But I think this is somewhat useful because
This works fine: file1 = open(not_exisiting_file1.txt, w) but this not: file2 = open(folder +
I want exactly like this...not a simple box but the one with shadow borders
Why does this not work? How can I make it work? That is, how
Why does this not work at all for me? <script type=text/javascript src=Javascript/jquery-ui-1.7.2.custom.min.js></script> <script type=text/javascript
This is an academic question (I'm not necessarily planning on doing it) but I

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.