Spring clean your usings


If you have worked on software that has been extended, upgraded and re-factored over time – then you will be aware that using statements accumulate at the top of C# files.  Some of these will be for namespaces and types that are no longer used in the code below.

An addition to the Visual Studio 2008 IDE is the ability to clean up and organise these using statements.

Just right-click to get the context menu in your code files and you will see the new menu option “Organize Usings”.  With this you can remove usings that are no longer in use, or sort the usings for a more aesthetic list.  Or why not go for a full clean up and do both!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: