Lock.Scope Struct 
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.
Represents a Lock that might have been entered.
public: value class Lock::Scopepublic ref struct Lock.Scopetype Lock.Scope = structPublic Structure Lock.Scope- Inheritance
Remarks
This type is intended to be used with the EnterScope method, which returns a Lock.Scope representing the lock that was entered, and with a language construct that automatically disposes the Lock.Scope, such as the C# using keyword. Disposing the Scope exits the lock. Ensure that Dispose is called even in case of exceptions.
For more information, see EnterScope and the Remarks for Lock.
Methods
| Dispose() | Exits the lock if the Lock.Scope represents a lock that was entered. |