Commonly used Visual Studio operating skills, continuous updates ......

Source: Internet
Author: User

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 ......

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.