Remove unused namespaces
-- Method 1: Right-click -- "organization using" -- "Remove unused using"
-- Method 2: Shift + F10 -- "O"-"R"
Format the current document and arrange the document in a neat manner.
-- Ctrl + k, d
Note
-- Ctrl + k, c
Uncomment
-- Ctrl + k, u
Full Screen/cancel full screen
-- Alt + Shift + enter
Generate current project
-- Shift + F6
Generate a solution
-- F6
Display output window
-- Ctrl + W, O
Display "attach to process" Window
-- CTRL + ALT + P
Expand/collapse the current node
-- Place the cursor in the node, CTRL + M, m
Collapse all nodes
-- Ctrl + M, O
Expand All nodes
-- Ctrl + M, L
Open command window
-- Method 1: "View" -- "other Windows" -- "command window"
-- Method 2: Ctrl + W,
Clear command window
-- Input: CLS
The "Open File" dialog box is displayed.
-- Method 1: Enter file. openfile
-- Method 2: input
-- Method 3: "file" -- "open" -- "W file"
-- Method 4: Ctrl + O
Use the command window to open a file in Visual Studio
-- Input: file. openfile + space + complete file path
Open the debugging "instant window"
-- Method 1: Ctrl + W, a -- input immed -- in the "instant window" input> cmd return "command window"
-- Method 2: "debug" -- "window" -- "instant"
Return values using the "instant window" Test Method
private static int Add(int value1, int value2)
{
int res = value1 + value2;
return res;
}
-- Input :? Add (1, 2)
Use the "instant window" with breakpoint debugging
class Program
{
static void Main(string[] args)
{
int sum = Add(1, 2);
Console.WriteLine(sum);
Console.ReadKey();
}
private static int Add(int value1, int value2)
{
int res = value1 + value2;
return res;
}
}
→ Place the breakpoint in the row of the add () method
→ In debug mode, click Start"
→ Open "instant window"
→ Input :? Value1. You can view the value of value1.
→ Input :? Value1 = 1. The value1 value can be inferred.
→ Input :? Value1 = 10, change the value of value1
Jump to a line
-- Ctrl + G
Commonly used Visual Studio operating skills, continuous updates ......