Jump to content


Code Comment


7 replies to this topic

#1 _NOISEcore

    Member

  • Members
  • PipPip
  • 31 posts

Posted 06 October 2011 - 02:57 PM

This may sound like a really dumb question. But I can't seem to find it anywhere on the internet.

Say that you are coding in Visual Studio, sometimes when you select a method, and InteliSense pops up, you can see which parameters are needed in a yellow-ish box.

Sometimes though, there is a text commenting the method in this same box.
How do you write these comments?

I'm writing some generic library for some friends of mine (for easy use) and
I would like to comment my code decently. It would be nice if they could see this comment by just hovering over it in InteliSense :)

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 5340 posts
  • LocationSanta Clara, CA

Posted 06 October 2011 - 04:12 PM

It just extracts it from the header file where the method is defined; if there's a comment above the method, or on the same line as the method, it'll (hopefully) pick that up.
reedbeta.com - developer blog, OpenGL demos, and other projects

#3 alphadog

    DevMaster Staff

  • Moderators
  • 1716 posts

Posted 07 October 2011 - 11:57 AM

Depends on your version of VS (Esp. Express vs not) and language.

For c#, it's old, but a good start.

For C++, it's a bit harder.
Hyperbole is, like, the absolute best, most wonderful thing ever! However, you'd be an idiot to not think dogmatism is always bad.

#4 _NOISEcore

    Member

  • Members
  • PipPip
  • 31 posts

Posted 07 October 2011 - 10:48 PM

Wauw. I had never seen the xml documentation before. This is really handy !
Thanks !

#5 _NOISEcore

    Member

  • Members
  • PipPip
  • 31 posts

Posted 08 October 2011 - 08:23 PM

Anyone has any recomendations for which program to use to transform the XML file into useful help/docu file?

#6 TheNut

    Senior Member

  • Moderators
  • 1718 posts
  • LocationCyberspace

Posted 09 October 2011 - 11:46 AM

Doxygen is one of the best ones out there. It supports many forms of commenting formats and programming languages. If you install graphviz in addition to Doxygen, you can produce class relationship diagrams. By default Doxygen will write HTML files, but you can export to RTF or my personal fav, CHM (compiled HTML).
http://www.nutty.ca - Being a nut has its advantages.

#7 _NOISEcore

    Member

  • Members
  • PipPip
  • 31 posts

Posted 09 October 2011 - 02:47 PM

Doxygen did the trick. Thanks alot !

#8 Serapth

    New Member

  • Members
  • PipPip
  • 20 posts

Posted 29 November 2011 - 06:39 PM

Frankly this can be acheived as easily as a triple slash ( /// ) which will automatically expand to the format required, then you just fill in the blanks.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users