Visual-Studio-2010 – Automatic Cleaning Code in Visual Studio 2010

I want to know, if possible, some kind of automatic code cleanup in Visual Studio 2010.

What’s particularly interesting is:

>Automatic indentation
>Delete trailing blank lines
>Delete unused use

In special cases, e.g. save the file.

< p>I didn’t find anything in the options, but maybe I’m just a little blind…at least it is possible that afaik intends to save in eclipse. Should there be something similar in Visual Studio?

Update: Thanks for the quick reply, the problem is that I am a product of keyboard shortcuts (but still thanks for the mention), but I am now dealing with a large amount of foreign code, and I don’t have to execute it manually. For each file: )

You can use edit/advance/format documents or equivalent keyboard shortcuts (Ctrl-K , Ctrl-D for me, YMMV) for automatic indentation.

I don’t know an automatic solution for trailing blank lines, although there may be extensions available (or you can write your own ).

Delete unused uses is a built-in VS refactoring, and can also be used in tools such as Resharper or DevExpress. (Right-click the code, then organize use/delete and sort.)

I don’t know how to save these standards automatically for each document save, but you may write a macro or VS extension to achieve this.

I I want to know, if possible, some kind of automatic code cleanup in Visual Studio 2010.

What is particularly interesting is:

>Automatic indentation
>Delete Trailing blank lines
>Delete unused uses

In special cases, e.g. save the file.

I did not find anything in the options, but Maybe I’m just a little blind… at least it is possible that afaik intends to save in eclipse. Should there be something similar in Visual Studio?

Update: Thanks for the quick reply, the problem is that I am a product of keyboard shortcuts (but still thanks for the mention), but I am now dealing with a large amount of foreign code, and I don’t have to execute it manually. For each file: )

You can use edit/advance/format documents or equivalent keyboard shortcuts (Ctrl-K, Ctrl-D for me, YMMV) Automatic indentation.

I don’t know the automatic solution for trailing blank lines, although there may be extensions available (or you can write your own extension).

Delete unused The use of is the built-in VS refactoring, and it can also be used in tools such as Resharper or DevExpress. (Right click on the code, then organize use/delete and sort.)

I don’t know to save for each document These standard methods happen automatically, but you might write a macro or VS extension to achieve this.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 1959 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.