.Net has functionality to remove unused namespaces. Below code is only display Developer Fusion on command prompt but it using 5 namespaces. This code is only using System namespace for Console class. Other namespace are not used in application.
using
System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace TestApplication
{
class
Program
{
static
void
Main(string[]
args)
{
string
blogNname = "Developer
Fusion";
Console.WriteLine(blogNname);
}
}
}
We can remove unused code by below method
Right mouse -> Organize Usings -> Remove Unused Usings

Now code will be like below
using
System;
namespace TestApplication
{
class
Program
{
static
void
Main(string[]
args)
{
string
blogNname = "Developer
Fusion";
Console.WriteLine(blogNname);
}
}
}

Join the conversation! Your thoughts help the community grow.