Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. C# - Self documenting code

C# - Self documenting code

Scheduled Pinned Locked Moved C#
csharptoolsxmlarchitecturediscussion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cnurse
    wrote on last edited by
    #1

    Hi Everybody - Happy Easter, have a peaceful weekend... I'd like to ask, to what extent do you use the XML tags in your code (such as summary etc.) I wonder if you could point me to some code that you consider "model" in its illustration of good practice. Also, do you use any additional tools. I have a developed an architecture that I consider elegant and simple to use, but to maintain it, it would require good documentation. I would welcome any thoughts and guidance so I can get past my basic use of summary and parameter tags. Many thanks. Nursey

    H 1 Reply Last reply
    0
    • C cnurse

      Hi Everybody - Happy Easter, have a peaceful weekend... I'd like to ask, to what extent do you use the XML tags in your code (such as summary etc.) I wonder if you could point me to some code that you consider "model" in its illustration of good practice. Also, do you use any additional tools. I have a developed an architecture that I consider elegant and simple to use, but to maintain it, it would require good documentation. I would welcome any thoughts and guidance so I can get past my basic use of summary and parameter tags. Many thanks. Nursey

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      At least document everything public and protected, anything which can be seen by other code. Use all relevent XML tags. This includes, obviously, the <summary>. If your method has parameters, then use the <param> tags. If you return values, use the <returns> tag. If you explicitly throw an exception or let one slide that you want to make sure developers know is possible, use the <exception> tags. Basically, use any tags that are relevent to the to member. If you want to provide more information about something, then use the <remarks> and/or <example> tags. For a great and free documentation compiler, see NDoc[^]. I've had the pleasure of working on it and I know this product is stable. Just look at the huge list of clients, including Microsoft. It can generate many formats like HTML Help 1 (ex: VS6 docs) and 2 (ex: VS7+ docs). It looks just like the current VS.NET / MSDN documentation as well. For larger products in a corporate environment, you might consider abstracting all comments away to separate files. Then use the <include> tag to specify an XPath expression that imports the documentation. This seems to be what Microsoft does since many members - especially overloaded methods - share the same content for various sections.

      Microsoft MVP, Visual C# My Articles

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups