Which is better, and when: using statement or calling Dispose() on an IDisposable in C#?
Murali Poola
I agree. I prefer the "using" statement over manual Dispose.
Using "using" statement because it will automatically call dispose when cursor moves out of that block at runtime.
Using should be used whereever applicable. It will automatically dispose off once program is out of the block
I prefer the "using" statement over manual Dispose.