There are two usage of "using" keyword
1. to import namespaces
e.g using System;
using System.IO;
2. to handle unmanaged resources
An object inside or outside the .NET Framework, which uses external code (For example: file handles, streams, DB connections). The Garbage Collector can't handle unmanaged resources, so we need to release them manually.
e.g using (Stream input = File.OpenRead(filename))
{
...
}
This can only be used with types that implement IDisposable.