IntelliSense in the Immediate Mode Command Window

IntelliSense can increase your productivity and your ability to discover class members and parameter information while you are debugging in the Immediate Mode command window.


This example shows how IntelliSense helps you discover a method named someMethod() and its parameter information when you are debugging. In addition, learn how IntelliSense helps you complete the name of this object for typing convenience in the Immediate Mode command window.

To set up this example

  1. Create a C# console application, and then use the View Code command to open Class1.cs in the Code Editor.
  2. Add the following method to Class1:
    public int someMethod (int i)
       i = i+3;
       return i;
  3. Add the following statements to Main(), and then set a breakpoint next to the line in bold:
    Class1 c1 = new Class1();
    int i = 0;
    c1.someMethod (i);
  4. Select the Start command from the Debug menu.
  5. In the Debug menu, select Windows, and then select the Immediate command (CTRL+ALT+I).

    The Immediate Mode command window opens.

  6. Type i to verify that Immediate Mode is working properly. Immediate Mode evaluates the immediate value of i, and returns 0.

To use IntelliSense in the Immediate Mode command window

  1. Type c1 and then the scope operator (.); for example:

    The List Members box appears with a list all of the Class1 members.

  2. Type s after c1. to begin typing the name of someMethod, and then press CTRL+SPACE to execute the Complete Word command. IntelliSense automatically completes the name of the object c1.someMethod.
  3. Type an open parenthesis after c1.someMethod. IntelliSense displays Parameter Info for c1.someMethod.
  4. Type 5) to complete this command, which should appear as follows:
  5. Press ENTER.

    Immediate Mode returns 8.

See Also

Visual C# IntelliSense | Modifying IntelliSense Options