Results 1 to 4 of 4

Thread: [2005] Adding Comments

  1. #1

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    [2005] Adding Comments

    In VB6 i had MZTools installed that allowed a button to be pressed and a Procedure/Module Header would added.

    eg.
    '-----------------------------------
    ' Procedure : SetFileDateFormat
    ' DateTime : 20/12/2007 20:26
    ' Author : Lintz
    ' Purpose : This function does stuff
    '-----------------------------------

    There is a version of MZTools for VS2005 but it's not free ( ). Does anyone know of any free add-ins for VS2005 that does the same function?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2005] Adding Comments

    I have to say that I think that that sort of stuff is a bit of a waste of time. Specifying the name of a method right above its declaration is pointless. Does it really matter when the method was defined? Maybe it's worth knowing who the author was in a team, so you can go back and ask someone about it, but otherwise that's a waste of time too. The purpose? That's not a waste of time but you can and should use the XML commenting functionality built into VS to provide a summary of every method and each of its parameters, then additional information can go in the remarks section. Obviously it's up to you whether you want to provide that information but I can't help thinking that it's not really worth it.

    Having said that, you could probably just use the Code Snippet Editor to create a code snippet to generate a block like that. I think it could insert the current date and time. If not a simple macro could do it for you.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: [2005] Adding Comments

    You may also find the XML commenting on top of a method/class.

    Just type in thre " ' " in a row. And it should add the stuff automatically. however, its a bit different from what your looking for. That stuff is documentation about the class/method.

  4. #4
    Frenzied Member MaximilianMayrhofer's Avatar
    Join Date
    Aug 2007
    Location
    IM IN YR LOOP
    Posts
    2,001

    Re: [2005] Adding Comments

    Pretty comments are about as useful to programming as masturbation is to reproduction.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width