Adjust the format policy of C # code editor

Source: Internet
Author: User

C # In #CodeThe editor can automatically format and adjust the C # code to make the code format more neat and consistent.

However, sometimes the Default Formatting method is not what we want. For example, when writing someProgramA single expression contains many mathematical operators (most of which are binary operators) and mathematical function calls. When you use the automatic Formatting Function of the C # editor, a space is added before and after each binary operator in the Code by default, as a result, even the code with a simple mathematical expression looks very long, for example:

 
Beta = (MU [0]-mu [1]-mu [2])/sum;

In this case, we may want to adjust the Default Formatting settings to remove spaces before and after the binary operators. The formatted code looks like this:

 
 beta = (MU [0]-mu [1]-mu [2])/sum; 

In vs2010, you can perform the following settings:

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.