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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:29:42+00:00 2026-06-12T03:29:42+00:00

In the MSDN Attributes Tutorial they use Author as an example for an attribute:

  • 0

In the MSDN Attributes Tutorial they use Author as an example for an attribute:

[Author("Jane Programmer", Version = 2), IsTested()]
class Order
{
    // add stuff here ...
}

This seemed to me to be a good idea because it would allow you to use reflection to group classes by author (for example) – effectively exposing metadata that would normally be in documentation to the compiler, which could be useful. I immediately thought “aha! I should be using attributes for all my inline block documentation” – e.g.:

[Author("Me")]
[Description("Add 1 to value")]
[Param("value", "The original value to add 1 to")]
public int AddOne(value) {return value + 1;}

However none of the answers I could find about documentation and attributes seem to suggest this method. They all use XML for inline documentation.

Are there any built-in attributes to assist with inline documentation? If not, are there any libraries / packages out there that include pre-defined sets of attributes for inline documentation?

  • 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-06-12T03:29:43+00:00Added an answer on June 12, 2026 at 3:29 am

    Some disadvantages of keeping documentation in attributes:

    • poor formatting for long texts;
    • no support by Visual Studio add-ons (e.g. using ReSharper’s documentation preview feature);
    • no support by 3rd party documentation generation tools;
    • inclusion of documentation in assemblies which significantly eases reverse engineering;
    • duplication of metadata in source codes with metadata stored in a version control system (there’s no point in tracking any declaration’s author and version in the source code, when the VCS gives you much more precise information — VCS’s don’t lie).

    I can’t think of any advantage right now. In case I would really need it, it’s always possible to parse the XML documentation comments and transform the whole codebase into any attributed form.

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

Sidebar

Related Questions

XmlAttributeOverrides is a good way to override some attributes for serialization. MSDN says: You
According to http://msdn.microsoft.com/en-us/library/ms810291.aspx , you can't change the ReadOnly attribute of an Expression based
MSDN states the following SortedSet(T).Add Method : If Count is less than the capacity
MSDN states that you do not need to specify the attribute suffix when using
I was checking XmlNode.Attributes topic on MSDN about methods for checking if a XmlNode
Good day. When i try to run the example from MSDN. But it failed
I'm following this tutorial http://blogs.msdn.com/b/astoriateam/archive/2010/07/21/odata-and-authentication-part-6-custom-basic-authentication.aspx . I need to add to the web.config :
MSDN is rather vague regarding this attribute. The custom data string can be set
On the MSDN I've found the following description for the two attributes: PreserveSig Set
There are three assembly version attributes. What are differences? Is it ok if 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.