using statement
A way to make sure a file or other resource gets closed when you're done.
A using statement or declaration calls Dispose on an IDisposable when control leaves its scope, even when an exception is thrown.
Examples
using var writer = new StreamWriter("log.txt");closes the file at the end of the block, even when an exception is thrown.
See also