views:

465

answers:

5

Where do the type/member/parameter descriptions that you see in the Intellisense bubble come from? Are they stored in type attributes?

EDIT: I'm specifically interested in the built-in types.

+4  A: 

I don't know about the built-in types, but when you're building your own classes you can use Xml comments to list out the intellisense information. The comments are put into their own xml file when you build the project, and as long as that file is in the right place Visual Studio will be able to use it. Not only that, but you'll get intellisense help to build the comments. For C#, just add an extra / character to a comment line right above a class, property, or method: ///. For VB, use two extra ' characters: '''

One caveat with this (and I'm sure there's an option somewhere to control it), but it's been my experience that once you put an xml comment anywhere in a project, you'll get a compile warning for every public item that isn't commented if you don't use them everywhere in the project.

Joel Coehoorn
I voted this up, but I don't seem to get the compile warning. Maybe it's a setting? I set Visual Studio to treat warnings as errors, so it would break the build.
Chris Canal
There is an option. Go into a project's properties and go the the "Build" section. There is a checkbox for "XML documentation file". When you check this option, you will receive warnings for all public methods that are not commented.
firedfly
A: 

Although if your classes are compiled and you don't want to publish the source code then you might need to create an XML schema file and place it here. Not to sure about the structure but have a poke around and you'll see what I mean.

[install drive]\Program Files (x86)\Microsoft Visual Studio 9.0\Xml\Schemas

Sir Psycho
A: 

I agree to Joel Coehoorn. You may have a look at the MSDN for this topic: http://msdn.microsoft.com/en-us/library/b2s063f7.aspx

Also there is a great article on codeproject with a lot of explanations, examples, a how-to when you want to make a documentation for your class without publishing the complete source code and a complete list of all standard tags you may use (you can define your own tags, too - just make sure to readout them with your doc-tool, e.g. sandcastle).

Article on codeproject: http://www.codeproject.com/KB/XML/csharpcodedocumentation.aspx

Anheledir
+3  A: 

The .Net Framework provides an XML documentation file for the shipped assemblies. The IDE reads these documentation files in order to get the descriptions and tooltips for the built-in types.

This documentation is typically, but not always, stored in a sub-directory of the framework intsall point. For instance on my machine the files are stored in the directory C:\windows\microsoft.net\framework\v2.0.50727\en.

There is one XML file per assembly shipped in the framework.

JaredPar
A: 

also look in the DotNetConfig.xsd file, usually found in the Visual Studio 8 (or 9) installation directory in the Xml\Schemas subdirectory.

Steven A. Lowe