public virtual void Unlock(long position, long length) { if (safeHandle.IsClosed) { throw new ObjectDisposedException("Stream has been closed"); } if (position < 0) { throw new ArgumentOutOfRangeException("position must not be negative"); } if (length < 0) { throw new ArgumentOutOfRangeException("length must not be negative"); } MonoIOError error; MonoIO.Unlock(safeHandle, position, length, out error); if (error != MonoIOError.ERROR_SUCCESS) { // don't leak the path information for isolated storage throw MonoIO.GetException(GetSecureFileName(name), error); } }