Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SetThreadStaticContext Method

SynchronizationContext.SetThreadStaticContext Method

.NET Framework 4.6 and 4.5

Sets the current context for thread static data.

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

public static void SetThreadStaticContext(
	SynchronizationContext syncContext
)

Parameters

syncContext
Type: System.Threading.SynchronizationContext

The context that is to be set.

ExceptionCondition
MethodAccessException

The property is security-critical but is accessed from transparent code.

Important noteImportant

Do not use this member in an app that targets Windows Phone OS 7.0 or 7.1. If you do, your code will throw a MethodAccessException. This member is security-critical, which restricts it to internal use only by the .NET Framework for Windows Phone class library.

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8
Show:
© 2015 Microsoft