How to remove unused usings from class file ?

Posted by Samir R. Bhogayta on Samir ASP.NET with C# Technology See other posts from Samir ASP.NET with C# Technology or by Samir R. Bhogayta
Published on 2013-09-13T15:35:00.003+05:30 Indexed on 2013/10/17 16:21 UTC
Read the original article Hit count: 232

Filed under:
When we create a .cs file means code file class is automatically create. That .cs file means class has default usings for namespace.


using System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;

We don't use all namespaces  in that class so we have to remove unused namespaces from file. We can remove  namespace manually but it takes time and need full knowledge of class library so we can use Visual Studio .

Step 1:  Right Click in .cs File.
Step 2:  Move on Organize usings.
Step 3: Click on Remove Unused Usings.

After that we have only those namespaces in the file these are using.
 

© Samir ASP.NET with C# Technology or respective owner