Dela via


Parameter Info

The Parameter Info feature opens the Parameters list to give you information about the number, names, and types of parameters required by a function or attribute.

Remarks

The parameter in bold indicates the next parameter that is required as you type the function.

Parameter Info Image

For overloaded functions, you can use the UP and DOWN arrow keys to view alternative parameter information for the function overloads.

Parameter Info with Overloads Image

When you annotate functions and parameters with XML Documentation comments, those comments will display as Parameter Info. For more information, see Supplying XML Code Comments.

The Parameters list also displays parameter information for nested functions. If you type a function as a parameter to another function, the Parameters list displays the parameters for the inner function. Then, when the inner function Parameters list is complete, the Parameters list reverts to displaying the outer function parameters.

In C++, you can view information about parameters required by a template. In C#, you can view information about generic type parameters.

Note

The appearance of features in the IDE can depend on your active settings or edition, and might differ from those described in Help. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

To view Parameter Info for functions

  1. After the name of a function, type an open parenthesis as you normally would to open the Parameters list.

    IntelliSense displays the complete declaration for the function in a pop-up window just under the insertion point. The first parameter in the list appears in bold.

  2. As you type the function parameters, the bold changes to reflect the next parameter that you need to enter.

  3. Press ESC at any time to close the list, or continue typing until you have completed the function.

    Typing the closing parenthesis also closes the Parameters list.

To turn Parameter Info off by default, clear Parameter information on the General property page for the desired language. See Modifying IntelliSense Options for more information.

You can manually invoke the Parameter Info feature as follows:

  • On the Edit menu, click IntelliSense and then click Parameter Info.

  • Use the CTRL+SHIFT+SPACE keyboard shortcut.

  • Select the Parameter Info toolbar button from the Text Editor toolbar.

[C++]

To display Parameter Info for templates

  1. Type the name of the template class, followed by "<". The declaration of the class pops up with the first parameter shown in bold.

  2. As you type the parameters, the next parameter you need to enter will become bold, as previously described for functions.

To display Parameter Info for attributes

  1. Inside an attribute block, type the attribute followed by an open parenthesis. A list of available attribute parameters pops up.

  2. Unlike Parameter Info for functions and templates, there is no use of bold type to indicate the next parameter, because the order of parameters in attributes is not important.

  3. Typing a parameter that takes a value (for example, the module attribute type parameter) followed by "=" will cause a list of possible values to pop up.

See Also

Other Resources

Using IntelliSense