Why to use “using” in C#?
Vivek Kumar
For connection
for implementing IDisposabel interface
using keyword can use two places 1.) when adding a namespace 2.) dispose the object automatically when the class implement idisposable interface.
“Using” statement calls – “dispose” method internally, whenever any exception occurred in any method call and in “Using” statement objects are read only and cannot be reassignable or modifiable.