Export (0) Print
Expand All

IntelliSense for Most Recently Used Members 

IntelliSense can pre-select the members that you have recently selected in the pop-up List Members box for automatic object name completion, during your current session in the IDE. This enables you to immediately proceed on the desired item, and avoid wasting time typing out its name, or browsing through a list of infrequently used members in the List Members box to execute automatic completion.

The history of most recently used members is cleared between each session in the IDE.

This example shows how to clear the history of your most recently used members and then use IntelliSense for new members using the WriteLine method.

To clear the history of MRU members

  1. In the Visual Studio Integrated Development Environment (IDE), click Tools, and then click Options.

  2. Expand the Text Editor node, then expand the node corresponding to the language history you want to clear (C# or Visual J#), and then select IntelliSense.

  3. Click the Clear history button to clear the history of members that you have previously used during automatic object name completion.

To use IntelliSense for MFU members

  1. Create a new console application.

  2. In a J# project, include the import statement for the .NET System namespace, as follows:

  3. import.System.*;

  4. In the Code Editor, type Console.Wr in the Main method.

    The List Members box appears after you type the scope operator (.). IntelliSense automatically selects the first member of the Console class that begins with Wr, which is the Write method.


    If you do not want to use the default selection and you would rather continue with a different method, such as the WriteLine method, then you may continue typing the object name until it is highlighted, press the DOWN ARROW key until the desired member is selected, or use the mouse to select the desired member.

  5. In the List Members box, select the WriteLine method.

  6. Press ENTER, TAB, or ( for automatic object name completion, and then complete the rest of the statement. For example:

    Console.WriteLine("IntelliSense preselected Write.");
  7. Type Console.W in the Code Editor again.

    Because the WriteLine method becomes the most recently used member of the Console class, IntelliSense already selects this method in the pop-up list box.


    Now you can immediately proceed on this method without having to type out the rest of its name or browse the List Members box for the WriteLine method.

  8. Press ENTER, and then complete the rest of the statement. For example:

    Console.WriteLine("IntelliSense preselected WriteLine.");

Community Additions

© 2014 Microsoft