ReaderWriterLockSlim.ExitWriteLock Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Reduces the recursion count for write mode, and exits write mode if the resulting count is 0 (zero).
public:
void ExitWriteLock();
public void ExitWriteLock();
member this.ExitWriteLock : unit -> unit
Public Sub ExitWriteLock ()
Exceptions
The current thread has not entered the lock in write mode.
Examples
The following example shows how to use a finally block to execute the ExitWriteLock method, ensuring that the caller exits write mode. The method shown in the example adds a new key/value pair to the synchronized cache. If the key is already in the cache, the exception thrown by the inner