Visible comments in a component

I wonder how you add comments in a component that shows up as an description of a method, property or event when it is selected

A better desription:
1. You make a component that contains some methods and properties
2. You import the component in a new project
3. You make an instance of a class in your component aClass objC = new aClass()
4. Via the instance you call a method objC.aMethod()
5. After you been writing the instance name (objC.), you add a dot and then a menu shows up where you can select a method, property or event within the instance.
6. When e.g. a method is selected there's a descriping text that tells you what the method do; that's the text I wonder how I'm going to add in a component!

I've been making components and been adding the XML comments (///<summary>) but this doesn't show up when importing the component in a new project.

Regards,
Nick



Answer this question

Visible comments in a component

  • aek

    You are on the right track.  The C# (and in 2.0 VB) documentation comments will provide the necessary information for Intellisense.  It primarily uses the <summary> and <param> tags to draft the tips it displays to you.  However since the comments aren't part of the binary code you'll also need to put the XML files generated from the compilation of your library in the same directory as the binaries (where VS is actually loading your assembly from).  Then Intellisense will pick up the documentation.  You should make sure you have enabled the generation of the XML file during compilation in your project settings.  You have to set it for all your configurations that you care about (i.e. Debug and Release).

    Michael Taylor - 10/25/05

  • Visible comments in a component