public void Close() { lock (this) { // Mark the file as closed if (!IsReadOnly) Write(16, 0); try { CloseStore(); } finally { IsClosed = true; } } }