Share via


List Members

You can display a list of valid members from a type or namespace. When a member from the list is selected, you can press ENTER to insert that member into your code.

List Members

To use the List Members option

  1. Begin typing the name of your object, and then type ALT+RIGHT ARROW to use Complete Word, which displays the members list box if what you have typed has more than one possible match or no match at all.

    IntelliSense displays all valid members in a scrollable list. For example, you can scroll or use the arrow keys to navigate through the list, or, if you know the first few letters of the member name, begin typing to jump directly to the member in the list.

  2. After the name of a class or structure, type the members access operator or scope operator:

    [C#]

    • . (members access operator) for an type or object instance.

    • :: (namespace alias qualifier operator)

    [C++]

    • -> (pointer to member) for a pointer to an object instance.

    • :: (scope resolution operator) for a class, structure, union or namespace.

  3. To insert the selected member in your code, do one of the following:

    • Type the character that follows the member, such as open parenthesis, comma, space, semicolon, or others, to insert the selected member followed by the character that you have just typed. This works for any nonidentifier character.

    -or-

    • Press TAB, CTRL+ENTER, ENTER, or double-click to insert just the member. If no item is selected in the drop-down menu, press ENTER to insert a blank new line. Press CTRL-ENTER to insert the item that has the focus box even if it is not selected.
  4. Press ESC at any time to close the Members list.

When you select an item from the Members list, but before you insert it, you will get Quick Info on the item and any code comments for the item. See Supplying Code Comments for more information.

The icon to the left represents the type of the member, such as namespace, class, function, or variable. Please see Class View and Object Browser Icons for a listing of list icons.

By default, to turn List Members off by default, deselect Auto list members from the General property page for the desired language. See Modifying IntelliSense Options for more information.

The List Members display may have many entries. You can go to the first element of the list or to the last element if you press CTRL-Page Up and CTRL-Page Down while in the List Members display.

You can manually invoke the List Members feature as follows:

  • Press the CTRL+J keys or the CTRL+SPACE shortcut.

  • On the Edit menu, click IntelliSense and then click List Members.

  • Right-click the text editor and click List Members from the shortcut menu (does not work in Visual Basic).

  • Select the List Members toolbar button from the Text Editor toolbar.

When invoked on a blank line or outside of a recognizable scope, the Members list displays symbols in the global namespace.

[C++]

If you invoke the List Members option using the insertion point in global scope or by typing :: in any valid scope, IntelliSense populates the Members list with global symbols, including system API functions and C++ classes.

See Also

Other Resources

Using IntelliSense