System.Threading.ExecutionContext.Capture Method

Captures the execution context from the current thread.

Syntax

public static ExecutionContext Capture ()

Returns

An System.Threading.ExecutionContext object representing the execution context for the current thread.

Remarks

The captured execution context can be used as the executionContext parameter for the ExecutionContext.Run(ExecutionContext, ContextCallback, object) method.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0