When you type "this." , you usually get all the routines, events, and more... of the current class you are in. And when you simply stand over one of the routines in the long list without choosing one, you usually get a description next to it.
How can I do that ? Let assume I have a class called CAR with two routines: speed_up(), and brake(). How can I make the person using my class to see a description of the two functions when he types:
CAR mycar = new CAR();
mycar.
Try adding a summary to your methods by keying in
///
and fill up like belowyou can do this for each of the methods and properties, so that it meaningfully displays the intent in Intellisense.
Give your classes and their members, XML comments, which will appear in intellisense. The easiest way of doing this in visual studio is by typing
///
above what you want to add comments to.For example:
The above was found here.
See also: How do you get XML comments to appear in a different project (dll)?
You have to put a comment on it like this:
You can describe the usage of the function
<summary>
and the meaning of the paramaters<param name="">
. If the function has a return value, you can describe it with the tag<returns>
. There are some mor tags supported, the will be listed by visual studio, when you write your comment after three\
.Above a class or a method, rather than a "//" comment. if you do a "///" triple slash ( otherwise known as an XML comment ), it performs a short cut to allow you to fill information out about the class or method you are commenting on.
This then appears in your code as such
When you then access the class or method through intellisense thats when the description will appear.
You need to add document comments for the methods. you can do this manually by typing '///' or using visual studio addin. If you follow good naming conventions GhostDoc adding will help you lot on this.
You can put comments like this: