Getting rid of unnecessary using statements in Visual Studio 2015

Here comes a quick tip for all of you who are bothered by unnecessary using statements in a class file. You know when you have the automatic “using System.Linq” statement and you never use Linq in that class? It’s a breeze to get rid of those in Visual Studio 2015 using the light bulb icon:

Images

Expand the icon and select “Remove Unnecessary Usings”.

This feature has been available for a long time in NetBeans for Java developers. Visual Studio has finally caught up without having to resort to tools like ReSharper.

Advertisement

About Andras Nemes
I'm a .NET/Java developer living and working in Stockholm, Sweden.

4 Responses to Getting rid of unnecessary using statements in Visual Studio 2015

  1. lazerducky says:

    Does this have any impact beside aesthetics? I thought they were loaded on demand, so if they aren’t used they aren’t loaded.

  2. neodescorpio says:

    some extension is already doing this but good to hear now it’s natively supported.

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 )

Facebook photo

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

Connecting to %s

Elliot Balynn's Blog

A directory of wonderful thoughts

Software Engineering

Web development

Disparate Opinions

Various tidbits

chsakell's Blog

WEB APPLICATION DEVELOPMENT TUTORIALS WITH OPEN-SOURCE PROJECTS

Once Upon a Camayoc

Bite-size insight on Cyber Security for the not too technical.

%d bloggers like this: