Breyta

Deila með


Lock.Scope Struct

Definition

Represents a Lock that might have been entered.

public: value class Lock::Scope
public ref struct Lock.Scope
type Lock.Scope = struct
Public Structure Lock.Scope
Inheritance
Lock.Scope

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.

Applies to