using (FileStream fileStream = new FileStream(path)) { // do something }
Now I know the using pattern is an implementation of IDisposable
In .Net classes Close() call Dispose(). You should do the same.