Export (0) Print
Expand All

ExecutionContext.CreateCopy Method

Creates a copy of the current execution context.

Namespace:  System.Threading
Assembly:  mscorlib (in mscorlib.dll)

member CreateCopy : unit -> ExecutionContext

Return Value

Type: System.Threading.ExecutionContext
An ExecutionContext object representing the current execution context.

ExceptionCondition
InvalidOperationException

This context cannot be copied because it is used. Only newly captured contexts can be copied.

This method is useful for propagating an execution context from one thread to another.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft