If I type something in VisualStudio2010 like DataSet1. I get a list of all available Methods and Properties (Intellisense). This works fine. But if I select a method or property in this list I don't get the description of if.
For Example if I have something like:
public class Dummy
{
/// <summary>
/// This is a test-method
/// </summary>
public string Do { get; set; }
}
And the usage is:
Dummy dummy = new Dummy();
dummy.Do = "dummy";
At the moment when I type dummy.Do I want to have the Property-comment to be displayed in the list of intellisense. Normally this is shown by a tooltip.
How can I turn this behavior on?
Does the feature work for properties like
String.Length
? This helps determine if the problem affects all properties or just user-defined properties.If class
Dummy
is actually part of a separate library which your project is referencing, you may need to include the XML documentation file along with the DLL assembly.Do you have any Visual Studio extensions installed? Some extensions, including but not limited to ReSharper, Productivity Power Tools, and Code Contracts Editor Extensions VS2010 modify the IntelliSense presentation in ways that could impact this feature. Try disabling any extensions you have installed and restart Visual Studio to see if the problem is resolved. If the feature starts working again, you can start narrowing down the problem to find the particular extension responsible for the problem.
Look in Tools > Options > Text Editor > C#. Make sure Parameter information is checked.
Make sure the XML documentation file: checkbox is checked under the Build tab in your project properties. Visual Studio will automatically add this file when you reference your DLL.
zsgalusz is correct - that is how you turn it on.
If the comment is still not showing, make sure that the XML syntax (comment) is correct. VS (to my knowledge) doesn't identify errors in the syntax, so its quite easy to make a mistake and not notice it. In most cases, just one or more characters in the wrong place will cause it to not work for that method/variable/class, etc... For example:
Looks correct right? Except ArgumetnException is not within the '"' characters thus the XML is invalid and intellisense wont show the comment.