Comments that show with Autocomplete Intellisense

Using Visual Studio 2005 Express for C#,

Does someone know how I would make a comment block for a method/function that would show up with the Intellisense when I try and use the method

For example lets say I had the method Add with the comment (I tried this way and others)
//
// Summary:
// Adds a new this customer to the database, etc
//
// Exceptions:
// No Database Connection, Duplicate Entry
//

public void Add(){ .. };

I would want the Summary of the method to show up with the Intellisense when I try to use the Add method, right now only the method signiture shows ( public void Add() ).

Is there some setting I might need, or some style like /** */ or /// because I've tried a few and it hasn't worked; Does the Express version even allow this

Any help would be appreciated, Thank You


Answer this question

Comments that show with Autocomplete Intellisense

  • lostagent2

    You want to add XML comments, which are denoted by ///. For example:

    /// <summary>
    /// Loads XML from a file
    /// </summary>
    /// <param name="strFilePath">Fully qualified path to the file</param>
    public void LoadXMLFromFile(string strFilePath) {
       // omitted
    }

    You can find more info in this MSDN article:
    http://msdn.microsoft.com/msdnmag/issues/02/06/xmlc/

    As far as I know, XML Comments are supported in the Express SKUs, but I haven't checked.

    You might also want to check out Roland Weigelt's GhostDoc, which can automagically generate a lot of documetation for you based on parsing of method and parameter names.
    http://www.roland-weigelt.de/ghostdoc/



  • Comments that show with Autocomplete Intellisense