Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ExecutionContext::CreateCopy Method ()

 

Creates a copy of the current execution context.

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

public:
ExecutionContext^ CreateCopy()

Return Value

Type: System.Threading::ExecutionContext^

An ExecutionContext object representing the current execution context.

Exception Condition
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
Available since 2.0
Return to top
Show:
© 2017 Microsoft