C# – How to have comments in IntelliSense for function in Visual Studio

cvb.netvisual studiovisual-studio-2008xml-comments

In Visual Studio and C#, when using a built in function such as ToString(), IntelliSense shows a yellow box explaining what it does.

alt text

alt text

How can I have that for functions and properties I write?

Best Answer

To generate an area where you can specify a description for the function and each parameter for the function, type the following on the line before your function and hit Enter:

  • C#: ///

  • VB: '''

See Recommended Tags for Documentation Comments (C# Programming Guide) for more info on the structured content you can include in these comments.