BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.Runtime.ConstrainedExecution.CriticalFinalizerObject System.Runtime.InteropServices._Thread System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None) System.Runtime.InteropServices.ComDefaultInterface(typeof(System.Runtime.InteropServices._Thread)) System.Runtime.InteropServices.ComVisible(true)

A process can create one or more threads to execute a portion of the program code associated with the process. Use a delegate or the delegate to specify the program code executed by a thread. The delegate allows you to pass data to the thread procedure.

For the duration of its existence, a thread is always in one or more of the states defined by . A scheduling priority level, as defined by , can be requested for a thread, but is not guaranteed to be honored by the operating system.

provides identification for managed threads. For the lifetime of your thread, it will not collide with the value from any other thread, regardless of the application domain from which you obtain the value.

An operating-system ThreadId has no fixed relationship to a managed thread, because an unmanaged host can control the relationship between managed and unmanaged threads. Specifically, a sophisticated host can use the CLR Hosting API to schedule many managed threads against the same operating system thread, or to move a managed thread between different operating system threads.

It is not necessary to retain a reference to a object once you have started the thread. The thread continues to execute until the thread procedure is complete.

Beginning with the net_v40_long, the behavior of some thread constructors is changed: Only fully trusted code can set the maximum stack size to a value that is greater than the default stack size (1 megabyte). If a larger value is specified when code is running with partial trust, the larger value is ignored and the default stack size is used. No exception is thrown. Code at any trust level can set the maximum stack size to a value that is less than the default stack size.

Creates and controls a thread, sets its priority, and gets its status.

- Constructor
  2.0.0.0
  4.0.0.0

  A thread does not begin executing when it is created. To schedule the thread for execution, call the method. To pass a data object to the thread, use the method overload.

  Visual Basic users can omit the constructor when creating a thread. Use the AddressOf operator when passing your method, for example Dim t As New Thread(AddressOf ThreadProc). Visual Basic automatically calls the constructor.

  Initializes a new instance of the class, specifying a delegate that allows an object to be passed to the thread when the thread is started.

  A delegate that represents the methods to be invoked when this thread begins executing.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  is .

  A thread does not begin executing when it is created. To schedule the thread for execution, call the method.

  Visual Basic users can omit the constructor when creating a thread. Use the AddressOf operator when passing your method for example Dim t As New Thread(AddressOf ThreadProc). Visual Basic automatically calls the constructor.

  Initializes a new instance of the class.

  A delegate that represents the methods to be invoked when this thread begins executing.
  0
- Constructor
  2.0.0.0
  4.0.0.0

  Avoid using this constructor overload. The default stack size used by the constructor overload is the recommended stack size for threads. If a thread has memory problems, the most likely cause is programming error, such as infinite recursion.

  Beginning with the net_v40_long, only fully trusted code can set to a value that is greater than the default stack size (1 megabyte). If a larger value is specified for when code is running with partial trust, is ignored and the default stack size is used. No exception is thrown. Code at any trust level can set to a value that is less than the default stack size.

  If you are developing a fully trusted library that will be used by partially trusted code, and you need to start a thread that requires a large stack, you must assert full trust before creating the thread, or the default stack size will be used. Do not do this unless you fully control the code that runs on the thread.

  If is less than the minimum stack size, the minimum stack size is used. If is not a multiple of the page size, it is rounded to the next larger multiple of the page size. For example, if you are using the .NET Framework version 2.0 on Microsoft Windows Vista, 256KB (262144 bytes) is the minimum stack size, and the page size is 64KB (65536 bytes).

  On versions of Microsoft Windows prior to Windows XP and Windows Server 2003, is ignored, and the stack size specified in the executable header is used.

  If you specify a very small stack size, you might need to disable stack-overflow probing. When the stack is severely constrained, the probing can itself cause a stack overflow. To disable stack overflow probing, add the following to your application configuration file.

  <configuration> <runtime> <disableStackOverflowProbing enabled="true"/> </runtime> </configuration>

  Initializes a new instance of the class, specifying a delegate that allows an object to be passed to the thread when the thread is started and specifying the maximum stack size for the thread.

  A delegate that represents the methods to be invoked when this thread begins executing.
  The maximum stack size, in bytes, to be used by the thread, or 0 to use the default maximum stack size specified in the header for the executable.
- Constructor
  2.0.0.0
  4.0.0.0

  Avoid using this constructor overload. The default stack size used by the constructor overload is the recommended stack size for threads. If a thread has memory problems, the most likely cause is programming error, such as infinite recursion.

  Beginning with the net_v40_long, only fully trusted code can set to a value that is greater than the default stack size (1 megabyte). If a larger value is specified for when code is running with partial trust, is ignored and the default stack size is used. No exception is thrown. Code at any trust level can set to a value that is less than the default stack size.

  If you are developing a fully trusted library that will be used by partially trusted code, and you need to start a thread that requires a large stack, you must assert full trust before creating the thread, or the default stack size will be used. Do not do this unless you fully control the code that runs on the thread.

  If is less than the minimum stack size, the minimum stack size is used. If is not a multiple of the page size, it is rounded to the next larger multiple of the page size. For example, if you are using the .NET Framework version 2.0 on Microsoft Windows Vista, 256KB (262144 bytes) is the minimum stack size, and the page size is 64KB (65536 bytes).

  On versions of Microsoft Windows prior to Windows XP and Windows Server 2003, is ignored, and the stack size specified in the executable header is used.

  If you specify a very small stack size, you might need to disable stack-overflow probing. When the stack is severely constrained, the probing can itself cause a stack overflow. To disable stack overflow probing, add the following to your application configuration file.

  <configuration> <runtime> <disableStackOverflowProbing enabled="true"/> </runtime> </configuration>

  Initializes a new instance of the class, specifying the maximum stack size for the thread.

  A delegate that represents the methods to be invoked when this thread begins executing.
  The maximum stack size, in bytes, to be used by the thread, or 0 to use the default maximum stack size specified in the header for the executable.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void Caller does not have security permission for the thread to be aborted. Requires permission to control the thread to be aborted. See .

  When this method is invoked on a thread, the system throws a in the thread to abort it. ThreadAbortException is a special exception that can be caught by application code, but is re-thrown at the end of the catch block unless is called. ResetAbort cancels the request to abort, and prevents the ThreadAbortException from terminating the thread. Unexecuted finally blocks are executed before the thread is aborted.

  When a thread calls Abort on itself, the effect is similar to throwing an exception; the happens immediately, and the result is predictable. However, if one thread calls Abort on another thread, the abort interrupts whatever code is running. There is also a chance that a static constructor could be aborted. In rare cases, this might prevent instances of that class from being created in that application domain. In the .NET Framework versions 1.0 and 1.1, there is a chance the thread could abort while a finally block is running, in which case the finally block is aborted.

  The thread is not guaranteed to abort immediately, or at all. This situation can occur if a thread does an unbounded amount of computation in the finally blocks that are called as part of the abort procedure, thereby indefinitely delaying the abort. To wait until a thread has aborted, you can call the method on the thread after calling the method, but there is no guarantee the wait will end.

  The thread that calls might block if the thread that is being aborted is in a protected region of code, such as a catch block, finally block, or constrained execution region. If the thread that calls holds a lock that the aborted thread requires, a deadlock can occur.

  If Abort is called on a thread that has not been started, the thread will abort when is called. If Abort is called on a thread that is blocked or is sleeping, the thread is interrupted and then aborted.

  If Abort is called on a thread that has been suspended, a is thrown in the thread that called , and is added to the property of the thread being aborted. A is not thrown in the suspended thread until is called.

  If Abort is called on a managed thread while it is executing unmanaged code, a ThreadAbortException is not thrown until the thread returns to managed code.

  If two calls to Abort come at the same time, it is possible for one call to set the state information and the other call to execute the Abort. However, an application cannot detect this situation.

  After Abort is invoked on a thread, the state of the thread includes . After the thread has terminated as a result of a successful call to Abort, the state of the thread is changed to . With sufficient permissions, a thread that is the target of an Abort can cancel the abort using the ResetAbort method. For an example that demonstrates calling the ResetAbort method, see the ThreadAbortException class.

  Raises a in the thread on which it is invoked, to begin the process of terminating the thread. Calling this method usually terminates the thread.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` Caller does not have security permission for this thread. Requires permission to control the thread to be aborted. See .

  When this method is invoked on a thread, the system throws a in the thread to abort it. ThreadAbortException is a special exception that can be caught by application code, but is re-thrown at the end of the catch block unless is called. ResetAbort cancels the request to abort, and prevents the ThreadAbortException from terminating the thread. Unexecuted finally blocks are executed before the thread is aborted.

  When a thread calls Abort on itself, the effect is similar to throwing an exception; the happens immediately, and the result is predictable. However, if one thread calls Abort on another thread, the abort interrupts whatever code is running. There is a chance that a static constructor could be aborted. In rare cases, this might prevent instances of that class from being created in that application domain. In the .NET Framework versions 1.0 and 1.1, there is a chance the thread could abort while a finally block is running, in which case the finally block is aborted.

  The thread is not guaranteed to abort immediately, or at all. This situation can occur if a thread does an unbounded amount of computation in the finally blocks that are called as part of the abort procedure, thereby indefinitely delaying the abort. To wait until a thread has aborted, you can call the method on the thread after calling the method, but there is no guarantee that the wait will end.

  The thread that calls might block if the thread that is being aborted is in a protected region of code, such as a catch block, finally block, or constrained execution region. If the thread that calls holds a lock that the aborted thread requires, a deadlock can occur.

  If Abort is called on a thread that has not been started, the thread will abort when is called. If Abort is called on a thread that is blocked or is sleeping, the thread is interrupted and then aborted.

  If Abort is called on a thread that has been suspended, a is thrown in the thread that called , and is added to the property of the thread being aborted. A is not thrown in the suspended thread until is called.

  If Abort is called on a managed thread while it is executing unmanaged code, a ThreadAbortException is not thrown until the thread returns to managed code.

  If two calls to Abort come at the same time, it is possible for one call to set the state information and the other call to execute the Abort. However, an application cannot detect this situation.

  After Abort is invoked on a thread, the state of the thread includes . After the thread has terminated as a result of a successful call to Abort, the state of the thread is changed to . With sufficient permissions, a thread that is the target of an Abort can cancel the abort using the ResetAbort method. For an example that demonstrates calling the ResetAbort method, see the ThreadAbortException class.

  Raises a in the thread on which it is invoked, to begin the process of terminating the thread while also providing exception information about the thread termination. Calling this method usually terminates the thread.

  An object that contains application-specific information, such as state, which can be used by the thread being aborted. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.LocalDataStoreSlot

  The .NET Framework provides two mechanisms for using thread local storage (TLS): thread-relative static fields (that is, fields that are marked with the attribute) and data slots. Thread-relative static fields provide much better performance than data slots, and enable compile-time type checking. For more information about using TLS, see Thread Local Storage: Thread-Relative Static Fields and Data Slots.

  The slot is allocated on all threads.

  Threads use a local store memory mechanism to store thread-specific data. The common language runtime allocates a multi-slot data store array to each process when it is created. The thread can allocate a data slot in the data store, store and retrieve a data value in the slot, and free the slot for reuse after the thread expires. Data slots are unique per thread. No other thread (not even a child thread) can get that data.

  Allocates an unnamed data slot on all the threads. For better performance, use fields that are marked with the attribute instead.

  The allocated named data slot on all threads.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.LocalDataStoreSlot ``

  The .NET Framework provides two mechanisms for using thread local storage (TLS): thread-relative static fields (that is, fields that are marked with the attribute) and data slots. Thread-relative static fields provide much better performance than data slots, and enable compile-time type checking. For more information about using TLS, see Thread Local Storage: Thread-Relative Static Fields and Data Slots.

  Threads use a local store memory mechanism to store thread-specific data. The common language runtime allocates a multi-slot data store array to each process when it is created. The thread can allocate a data slot in the data store, store and retrieve a data value in the slot, and free the slot for reuse after the thread expires. Data slots are unique per thread. No other thread (not even a child thread) can get that data.

  It is not necessary to use the method to allocate a named data slot, because the method allocates the slot if it has not already been allocated.

  If the method is used, it should be called in the main thread at program startup, because it throws an exception if a slot with the specified name has already been allocated. There is no way to test whether a slot has already been allocated.

  Slots allocated with this method must be freed with .

  Allocates a named data slot on all threads. For better performance, use fields that are marked with the attribute instead.

  The allocated named data slot on all threads.

  The name of the data slot to be allocated.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Deprecated in favor of GetApartmentState, SetApartmentState and TrySetApartmentState.")
  System.Threading.ApartmentState To be added.

  In the .NET Framework versions 1.0 and 1.1, the ApartmentState property marks a thread to indicate that it will execute in a single-threaded or multithreaded apartment. This property can be set when the thread is in the Unstarted or Running thread state; however, it can be set only once for a thread. If the property has not been set, it returns Unknown.

  In the .NET Framework version 2.0, new threads are initialized as if their apartment state has not been set before they are started. The main application thread is initialized to by default. You can no longer set the main application thread to by setting the property on the first line of code. Use the instead.

  In the .NET Framework version 2.0, you can specify the COM threading model for a C++ application using the /CLRTHREADATTRIBUTE (Set CLR Thread Attribute) linker option.

  Gets or sets the apartment state of this thread.

- Method
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  System.Void

  Hosts of the common language runtime (CLR), such as Microsoft SQL Server 2005, can establish different policies for failures in critical and non-critical regions of code. A critical region is one in which the effects of a thread abort or an unhandled exception might not be limited to the current task. By contrast, an abort or failure in a non-critical region of code affects only the task in which the error occurs.

  For example, consider a task that attempts to allocate memory while holding a lock. If the memory allocation fails, aborting the current task is not sufficient to ensure stability of the , because there can be other tasks in the domain waiting for the same lock. If the current task is terminated, other tasks could be deadlocked.

  When a failure occurs in a critical region, the host might decide to unload the entire rather than take the risk of continuing execution in a potentially unstable state. To inform the host that your code is entering a critical region, call . Call when execution returns to a non-critical region of code.

  Using this method in code that runs under SQL Server 2005 requires the code to be run at the highest host protection level.

  Notifies a host that execution is about to enter a region of code in which the effects of a thread abort or unhandled exception might jeopardize other tasks in the application domain.

- Method
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  System.Void

  Some hosts of the common language runtime, such as Microsoft SQL Server 2005, provide their own thread management. A host that provides its own thread management can move an executing task from one physical operating system thread to another at any time. Most tasks are not affected by this switching. However, some tasks have thread affinity - that is, they depend on the identity of a physical operating system thread. These tasks must inform the host when they execute code that should not be switched.

  For example, if your application calls a system API to acquire an operating system lock that has thread affinity, such as a Win32 CRITICAL_SECTION, you must call before acquiring the lock, and after releasing the lock.

  Using this method in code that runs under SQL Server 2005 requires the code to be run at the highest host protection level.

  Notifies a host that managed code is about to execute instructions that depend on the identity of the current physical operating system thread.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.Remoting.Contexts.Context To be added. To be added.

  Gets the current context in which the thread is executing.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.CultureInfo To be added.

  The object that is returned by this property, together with its associated objects, determine the default format for dates, times, numbers, currency values, the sorting order of text, casing conventions, and string comparisons. See the class to learn about culture names and identifiers, the differences between invariant, neutral, and specific cultures, and the way culture information affects threads and application domains. See the property to learn how a thread's default culture is determined, and how users set culture information for their computers.

  Beginning with the net_v40_long, you can set the property to a neutral culture. This is because the behavior of the class has changed: When it represents a neutral culture, its property values (in particular, the , , , , and properties) now reflect the specific culture that is associated with the neutral culture. In earlier versions of the .NET Framework, the property threw a exception when a neutral culture was assigned.

  Gets or sets the culture for the current thread.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.Principal.IPrincipal An object implementing which encapsulates information about the principal which the thread is executing on behalf of. To be added.

  Gets or sets the thread's current principal (for role-based security).

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  get: System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  System.Threading.Thread

  An instance of representing the current thread.

  This property is read-only.

  Gets the currently running thread.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.CultureInfo To be added.

  The UI culture specifies the resources an application needs to support user input and output, and by default is the same as the operating system culture. See the class to learn about culture names and identifiers, the differences between invariant, neutral, and specific cultures, and the way culture information affects threads and application domains. See the property to learn how a thread's default UI culture is determined.

  The returned by this property can be a neutral culture. Neutral cultures should not be used with formatting methods such as , , and . Use the method to get a specific culture, or use the property.

  The method throws for the neutral cultures "zh-Hant" ("zh-CHT") and "zh-Hans" ("zh-CHS").

  Gets or sets the current culture used by the Resource Manager to look up culture-specific resources at run time.

- Method
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void

  Hosts of the common language runtime (CLR), such as Microsoft SQL Server 2005, can establish different policies for failures in critical and non-critical regions of code. A critical region is one in which the effects of a thread abort or an unhandled exception might not be limited to the current task. By contrast, an abort or failure in a non-critical region of code affects only the task in which the error occurs.

  For example, consider a task that attempts to allocate memory while holding a lock. If the memory allocation fails, aborting the current task is not sufficient to ensure stability of the , because there can be other tasks in the domain waiting for the same lock. If the current task is terminated, other tasks could be deadlocked.

  When a failure occurs in a critical region, the host might decide to unload the entire rather than take the risk of continuing execution in a potentially unstable state. To inform the host that your code is entering a critical region, call . Call when execution returns to a non-critical region of code.

  Using this method in code that runs under SQL Server 2005 requires the code to be run at the highest host protection level.

  Notifies a host that execution is about to enter a region of code in which the effects of a thread abort or unhandled exception are limited to the current task.

- Method
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  System.Void

  Some hosts of the common language runtime, such as Microsoft SQL Server 2005, provide their own thread management. A host that provides its own thread management can move an executing task from one physical operating system thread to another at any time. Most tasks are not affected by this switching. However, some tasks have thread affinity - that is, they depend on the identity of a physical operating system thread. These tasks must inform the host when they execute code that should not be switched.

  For example, if your application calls a system API to acquire an operating system lock that has thread affinity, such as a Win32 CRITICAL_SECTION, you must call before acquiring the lock, and after releasing the lock.

  Using this method in code that runs under SQL Server 2005 requires the code to be run at the highest host protection level.

  Notifies a host that managed code has finished executing instructions that depend on the identity of the current physical operating system thread.

- Property
  2.0.0.0
  4.0.0.0
  get: System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
  System.Threading.ExecutionContext To be added.

  The class provides a single container for all information relevant to a logical thread of execution. This includes security context, call context, synchronization context, localization context, and transaction context.

  Gets an object that contains information about the various contexts of the current thread.

- Method
  1.0.5000.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void

  Releases the resources held by this instance.

  Application code does not call this method; it is automatically invoked during garbage collection.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  The .NET Framework provides two mechanisms for using thread local storage (TLS): thread-relative static fields (that is, fields that are marked with the attribute) and data slots. Thread-relative static fields provide much better performance than data slots, and enable compile-time type checking. For more information about using TLS, see Thread Local Storage: Thread-Relative Static Fields and Data Slots.

  After any thread calls FreeNamedDataSlot, any other thread that calls with the same name will allocate a new slot associated with the name. Subsequent calls to GetNamedDataSlot by any thread will return the new slot. However, any thread that still has a returned by an earlier call to GetNamedDataSlot can continue to use the old slot.

  A slot that has been associated with a name is released only when every LocalDataStoreSlot that was obtained prior to the call to FreeNamedDataSlot has been released and garbage-collected.

  Threads use a local store memory mechanism to store thread-specific data. The common language runtime allocates a multi-slot data store array to each process when it is created. The thread can allocate a data slot in the data store, store and retrieve a data value in the slot, and free the slot for reuse after the thread expires. Data slots are unique per thread. No other thread (not even a child thread) can get that data.

  Eliminates the association between a name and a slot, for all threads in the process. For better performance, use fields that are marked with the attribute instead.

  The name of the data slot to be freed.
- Method
  2.0.0.0
  4.0.0.0
  System.Threading.ApartmentState

  This method, along with the method and the method, replaces the property.

  Returns an value indicating the apartment state.

  One of the values indicating the apartment state of the managed thread. The default is .

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("see CompressedStack class")
  System.Threading.CompressedStack

  This method is no longer supported.

  Returns a object that can be used to capture the stack for the current thread.

  None.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object ``

  The .NET Framework provides two mechanisms for using thread local storage (TLS): thread-relative static fields (that is, fields that are marked with the attribute) and data slots. Thread-relative static fields provide much better performance than data slots, and enable compile-time type checking. For more information about using TLS, see Thread Local Storage: Thread-Relative Static Fields and Data Slots.

  Threads use a local store memory mechanism to store thread-specific data. The common language runtime allocates a multi-slot data store array to each process when it is created. The thread can allocate a data slot in the data store, store and retrieve a data value in the slot, and free the slot for reuse after the thread expires. Data slots are unique per thread. No other thread (not even a child thread) can get that data.

  is a Shared method that always applies to the currently executing thread, even if you call it using a variable that refers to another thread. To avoid confusion, use the class name when calling Shared methods: Dim test As Object = Thread.GetData(testSlot).

  Retrieves the value from the specified slot on the current thread, within the current thread's current domain. For better performance, use fields that are marked with the attribute instead.

  The retrieved value.

  The from which to get the value.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.AppDomain To be added.

  Returns the current domain in which the current thread is running.

  An representing the current application domain of the running thread.

  1
  RuntimeInfrastructure
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  Returns a unique application domain identifier.

  A 32-bit signed integer uniquely identifying the application domain.

- Method
  2.0.0.0
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Int32

  The hash code is not guaranteed to be unique. Use the property if you need a unique identifier for a managed thread.

  Returns a hash code for the current thread.

  An integer hash code value.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.LocalDataStoreSlot ``

  The .NET Framework provides two mechanisms for using thread local storage (TLS): thread-relative static fields (that is, fields that are marked with the attribute) and data slots. Thread-relative static fields provide much better performance than data slots, and enable compile-time type checking. For more information about using TLS, see Thread Local Storage: Thread-Relative Static Fields and Data Slots.

  Threads use a local store memory mechanism to store thread-specific data. The common language runtime allocates a multi-slot data store array to each process when it is created. The thread can allocate a data slot in the data store, store and retrieve a data value in the slot, and free the slot for reuse after the thread expires. Data slots are unique per thread. No other thread (not even a child thread) can get that data.

  If the named slot does not exist, a new slot is allocated. Named data slots are public and can be manipulated by anyone.

  Looks up a named data slot. For better performance, use fields that are marked with the attribute instead.

  A allocated for this thread.

  The name of the local data slot.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

  If this thread is not currently blocked in a wait, sleep, or join state, it will be interrupted when it next begins to block.

  is thrown in the interrupted thread, but not until the thread blocks. If the thread never blocks, the exception is never thrown, and thus the thread might complete without ever being interrupted.

  Interrupts a thread that is in the WaitSleepJoin thread state.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  if this thread has been started, and has not terminated; otherwise, .

  This property is read-only.

  Gets a value indicating the execution status of the current thread.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  if the thread is or is to become a background thread; otherwise, .

  The thread has reached the state.

  A thread is either a background thread or a foreground thread. Background threads are identical to foreground threads, except that background threads do not prevent a process from terminating. Once all foreground threads belonging to a process have terminated, the common language runtime ends the process. Any remaining background threads are stopped and do not complete.

  Gets or sets a value indicating whether or not a thread is a background thread.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  For more information see The Managed Thread Pool.

  Gets a value indicating whether or not a thread belongs to the managed thread pool.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void The caller attempted to join a thread that is in the state.

  Use this method to ensure a thread has terminated. The caller will block indefinitely if the thread does not terminate. If the thread has already terminated when is called, the method returns immediately.

  This method changes the state of the calling thread to include . You cannot invoke Join on a thread that is in the state.

  Blocks the calling thread until a thread terminates, while continuing to perform standard COM and SendMessage pumping.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean `` The value of is negative and is not equal to . The caller attempted to join a thread that is in the state.

  If is specified for the parameter, this method behaves identically to the method overload, except for the return value.

  If the thread has already terminated when is called, the method returns immediately.

  This method changes the state of the calling thread to include . You cannot invoke Join on a thread that is in the state.

  Blocks the calling thread until a thread terminates or the specified time elapses, while continuing to perform standard COM and SendMessage pumping.

  true if the thread has terminated; false if the thread has not terminated after the amount of time specified by the parameter has elapsed.

  The number of milliseconds to wait for the thread to terminate. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean `` The value of is negative and is not equal to milliseconds, or is greater than milliseconds. The caller attempted to join a thread that is in the state.

  If is specified for , this method behaves identically to the method overload, except for the return value.

  If the thread has already terminated when is called, the method returns immediately.

  This method changes the state of the current thread to include . You cannot invoke Join on a thread that is in the state.

  Blocks the calling thread until a thread terminates or the specified time elapses, while continuing to perform standard COM and SendMessage pumping.

  true if the thread terminated; false if the thread has not terminated after the amount of time specified by the parameter has elapsed.

  A set to the amount of time to wait for the thread to terminate. 0
- Property
  2.0.0.0
  4.0.0.0
  get: System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Int32 To be added.

  The value of the property does not vary over time, even if unmanaged code that hosts the common language runtime implements the thread as a fiber.

  Gets a unique identifier for the current managed thread.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

  is required only on multiprocessor systems with weak memory ordering (for example, a system employing multiple Intel Itanium processors).

  For most purposes, the C# lock statement, the Visual Basic SyncLock statement, or the class provide easier ways to synchronize data.

  Synchronizes memory access as follows: The processor executing the current thread cannot reorder instructions in such a way that memory accesses prior to the call to execute after memory accesses that follow the call to .

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing the name of the thread, or if no name was set.

  A set operation was requested, and the property has already been set.

  This property is write-once.

  Gets or sets the name of the thread.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Threading.ThreadPriority

  A value.

  The thread is in the state. The value specified for a set operation is not a valid value.

  A thread can be assigned any one of the following priority values:

  Highest

  AboveNormal

  Normal

  BelowNormal

  Lowest

  Operating systems are not required to honor the priority of a thread.

  Gets or sets a value indicating the scheduling priority of a thread.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void was not invoked on the current thread. Caller does not have security permission for the current thread. Requires permission to control the current thread. See .

  For an example that demonstrates calling this method, see .

  This method can only be called by code with the proper permissions. For more information see [<topic://cpconMakingSecurityDemands>].

  When a call is made to Abort to terminate a thread, the system throws a . ThreadAbortException is a special exception that can be caught by application code, but is rethrown at the end of the catch block unless ResetAbort is called. ResetAbort cancels the request to abort, and prevents the ThreadAbortException from terminating the thread.

  See for an example that demonstrates calling the ResetAbort method.

  Cancels an requested for the current thread.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("")
  System.Void

  Do not use the and methods to synchronize the activities of threads. You have no way of knowing what code a thread is executing when you suspend it. If you suspend a thread while it holds locks during a security permission evaluation, other threads in the might be blocked. If you suspend a thread while it is executing a class constructor, other threads in the that attempt to use that class are blocked. Deadlocks can occur very easily.

  Resumes a thread that has been suspended.

- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  New threads are initialized as if their apartment state has not been set before they are started. Apartment state must be set before a thread is started.

  The main application thread is initialized to by default. The only way to set the apartment state of the main application thread to is to apply the attribute to the entry point method.

  The method, along with the method and the method, replaces the property.

  Sets the apartment state of a thread before it is started.

  The new apartment state.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("see CompressedStack class")
  System.Void ``

  This method is no longer supported.

  Applies a captured to the current thread.

  The object to be applied to the current thread.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The .NET Framework provides two mechanisms for using thread local storage (TLS): thread-relative static fields (that is, fields that are marked with the attribute) and data slots. Thread-relative static fields provide much better performance than data slots, and enable compile-time type checking. For more information about using TLS, see Thread Local Storage: Thread-Relative Static Fields and Data Slots.

  Threads use a local store memory mechanism to store thread-specific data. The common language runtime allocates a multi-slot data store array to each process when it is created. The thread can allocate a data slot in the data store, store and retrieve a data value in the slot, and free the slot for reuse after the thread procedure ends and the object has been reclaimed by garbage collection. Data slots are unique per thread. No other thread (not even a child thread) can get that data.

  is a Shared method that always applies to the currently executing thread, even if you call it using a variable that refers to another thread. To avoid confusion, use the class name when calling Shared methods: Thread.SetData(testSlot, "test data").

  Sets the data in the specified slot on the currently running thread, for that thread's current domain. For better performance, use fields marked with the attribute instead.

  The in which to set the value. The value to be set.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` The value of is negative and is not equal to .

  The thread will not be scheduled for execution by the operating system for the amount of time specified. This method changes the state of the thread to include .

  You can specify for the parameter to suspend the thread indefinitely. However, we recommend that you use other classes such as , , , or instead to sychronize threads or manage resources.

  This method does not perform standard COM and SendMessage pumping.

  If you need to sleep on a thread that has , but you want to perform standard COM and SendMessage pumping, consider using one of the overloads of the method that specifies a timeout interval.

  Suspends the current thread for the specified number of milliseconds.

  The number of milliseconds for which the thread is suspended. A value of zero (0) has no effect. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` The value of is negative and is not equal to milliseconds, or is greater than milliseconds.

  The thread will not be scheduled for execution by the operating system for the amount of time specified. This method changes the state of the thread to include .

  You can specify for the parameter to suspend the thread indefinitely. However, we recommend that you use other classes such as , , , or instead to sychronize threads or manage resources.

  This overload of uses the total number of whole milliseconds in . Fractional milliseconds are discarded.

  This method does not perform standard COM and SendMessage pumping.

  If you need to sleep on a thread that has , but you want to perform standard COM and SendMessage pumping, consider using one of the overloads of the method that specifies a timeout interval.

  Suspends the current thread for the specified amount of time.

  The amount of time for which the thread is suspended. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void ``

  The method is useful for implementing locks. Classes in the .NET Framework, such as and , use this method internally. essentially puts the processor into a very tight loop, with the loop count specified by the parameter. The duration of the wait therefore depends on the speed of the processor.

  Contrast this with the method. A thread that calls yields the rest of its current slice of processor time, even if the specified interval is zero. Specifying a non-zero interval for removes the thread from consideration by the thread scheduler until the time interval has elapsed.

  is not generally useful for ordinary applications. In most cases, you should use the synchronization classes provided by the .NET Framework; for example, call or a statement that wraps (lock in C# or SyncLock in Visual Basic).

  In the rare case where it is advantageous to avoid a context switch, such as when you know that a state change is imminent, make a call to the method in your loop. The code executes is designed to prevent problems that can occur on computers with multiple processors. For example, on computers with multiple Intel processors employing Hyper-Threading technology, prevents processor starvation in certain situations.

  Causes a thread to wait the number of times defined by the parameter.

  A 32-bit signed integer that defines how long a thread is to wait.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void There is not enough memory available to start the thread. This method was invoked on a thread reference. The thread has already been started.

  The following example demonstrates creating a thread and starting it.

  `using System; using System.Threading; public class ThreadWork { public static void DoWork() { for (int i = 0; i<3;i++) { Console.WriteLine ("Working thread ..."); Thread.Sleep(100); } } } class ThreadTest{ public static void Main() { ThreadStart myThreadDelegate = new ThreadStart(ThreadWork.DoWork); Thread myThread = new Thread(myThreadDelegate); myThread.Start(); for (int i = 0; i<3; i++) { Console.WriteLine("In main."); Thread.Sleep(100); } } }`

  One possible set of output is

  In main.

  Working thread ...

  In main.

  Working thread ...

  In main.

  Working thread ...

  Note that the sequence of the output statements is not guaranteed to be identical across systems.

  Once a thread is in the state, the operating system can schedule it for execution. The thread begins executing at the first line of the method represented by the or delegate supplied to the thread constructor.

  If this overload is used with a thread created using a delegate, null is passed to the method executed by the thread.

  Once the thread terminates, it cannot be restarted with another call to Start.

  Causes the operating system to change the state of the current instance to .

  0
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  Once a thread is in the state, the operating system can schedule it for execution. The thread begins executing at the first line of the method represented by the or delegate supplied to the thread constructor.

  Once the thread terminates, it cannot be restarted with another call to Start.

  This overload and the delegate make it easy to pass data to a thread procedure, but the technique is not type safe because any object can be passed to this overload. A more robust way to pass data to a thread procedure is to put both the thread procedure and the data fields into a worker object. For more information, see Creating Threads.

  Causes the operating system to change the state of the current instance to , and optionally supplies an object containing data to be used by the method the thread executes.

  An object that contains data to be used by the method the thread executes.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("")
  System.Void

  If the thread is already suspended, this method has no effect.

  Do not use the and methods to synchronize the activities of threads. You have no way of knowing what code a thread is executing when you suspend it. If you suspend a thread while it holds locks during a security permission evaluation, other threads in the might be blocked. If you suspend a thread while it is executing a class constructor, other threads in the that attempt to use that class are blocked. Deadlocks can occur very easily.

  Either suspends the thread, or if the thread is already suspended, has no effect.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  This method is for access to managed classes from unmanaged code, and should not be called from managed code. For more information about IDispatch::GetTypeInfo, see the MSDN Library.

  Retrieves the type information for an object, which can then be used to get the type information for an interface.

  The type information to return. The locale identifier for the type information. Receives a pointer to the requested type information object.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` To be added. To be added. To be added.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` `` `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Threading.ThreadState

  A combination of one or more values, which indicate the state of the current thread.

  The property provides more specific information than the property.

  Thread state is only of interest in debugging scenarios. Your code should never use thread state to synchronize the activities of threads.

  Gets a value containing the states of the current thread.

  0
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  New threads are initialized as if their apartment state has not been set before they are started. Apartment state must be set before a thread is started.

  The main application thread is initialized to by default. The only way to set the apartment state of the main application thread to is to apply the attribute to the entry point method.

  The method, along with the method and the method, replaces the property.

  Sets the apartment state of a thread before it is started.

  true if the apartment state is set; otherwise, false.

  The new apartment state.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Byte `` A reference to a that specifies the address in memory from which to read.

  Performs a volatile read from the specified address.

  A containing the value at the specified address after any pending writes.

  The value at the given address is atomically loaded with acquire semantics, meaning that the read is guaranteed to occur prior to any references to memory that occur after the execution of this method in the current thread. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the load CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double `` A reference to a that specifies the address in memory from which to read.

  Performs a volatile read from the specified address.

  A containing the value at the specified address after any pending writes.

  The value at the given address is atomically loaded with acquire semantics, meaning that the read is guaranteed to occur prior to any references to memory that occur after the execution of this method in the current thread. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the load CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int16 `` A reference to a that specifies the address in memory from which to read.

  Performs a volatile read from the specified address.

  A containing the value at the specified address after any pending writes.

  The value at the given address is atomically loaded with acquire semantics, meaning that the read is guaranteed to occur prior to any references to memory that occur after the execution of this method in the current thread. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the load CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` A reference to a that specifies the address in memory from which to read.

  Performs a volatile read from the specified address.

  A containing the value at the specified address after any pending writes.

  The value at the given address is atomically loaded with acquire semantics, meaning that the read is guaranteed to occur prior to any references to memory that occur after the execution of this method in the current thread. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the load CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int64 `` A reference to a that specifies the address in memory from which to read.

  Performs a volatile read from the specified address.

  A containing the value at the specified address after any pending writes.

  The value at the given address is atomically loaded with acquire semantics, meaning that the read is guaranteed to occur prior to any references to memory that occur after the execution of this method in the current thread. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the load CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IntPtr `` A reference to a that specifies the address in memory from which to read.

  Performs a volatile read from the specified address.

  A containing the value at the specified address after any pending writes.

  The value at the given address is atomically loaded with acquire semantics, meaning that the read is guaranteed to occur prior to any references to memory that occur after the execution of this method in the current thread. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the load CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  1
  RuntimeInfrastructure
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object `` A reference to a that specifies the address in memory from which to read.

  Performs a volatile read from the specified address.

  A containing the value at the specified address after any pending writes.

  The value at the given address is atomically loaded with acquire semantics, meaning that the read is guaranteed to occur prior to any references to memory that occur after the execution of this method in the current thread. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the load CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.SByte `` A reference to a that specifies the address in memory from which to read.

  Performs a volatile read from the specified address.

  A containing the value at the specified address after any pending writes.

  The value at the given address is atomically loaded with acquire semantics, meaning that the read is guaranteed to occur prior to any references to memory that occur after the execution of this method in the current thread. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the load CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Single `` A reference to a that specifies the address in memory from which to read.

  Performs a volatile read from the specified address.

  A containing the value at the specified address after any pending writes.

  The value at the given address is atomically loaded with acquire semantics, meaning that the read is guaranteed to occur prior to any references to memory that occur after the execution of this method in the current thread. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the load CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.UInt16 `` A reference to a that specifies the address in memory from which to read.

  Performs a volatile read from the specified address.

  A containing the value at the specified address after any pending writes.

  The value at the given address is atomically loaded with acquire semantics, meaning that the read is guaranteed to occur prior to any references to memory that occur after the execution of this method in the current thread. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the load CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.UInt32 `` A reference to a that specifies the address in memory from which to read.

  Performs a volatile read from the specified address.

  A containing the value at the specified address after any pending writes.

  The value at the given address is atomically loaded with acquire semantics, meaning that the read is guaranteed to occur prior to any references to memory that occur after the execution of this method in the current thread. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the load CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.UInt64 `` A reference to a that specifies the address in memory from which to read.

  Performs a volatile read from the specified address.

  A containing the value at the specified address after any pending writes.

  The value at the given address is atomically loaded with acquire semantics, meaning that the read is guaranteed to occur prior to any references to memory that occur after the execution of this method in the current thread. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the load CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.UIntPtr `` A reference to a that specifies the address in memory from which to read.

  Performs a volatile read from the specified address.

  A containing the value at the specified address after any pending writes.

  The value at the given address is atomically loaded with acquire semantics, meaning that the read is guaranteed to occur prior to any references to memory that occur after the execution of this method in the current thread. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the load CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` A reference to a that specifies the address in memory at which to write. A that specifies the value to write.

  Performs a volatile write to the specified address.

  The value is written atomically to the specified address with release semantics, meaning that the write is guaranteed to happen after any references to memory that occur prior to the execution. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the store CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` A reference to a that specifies the address in memory at which to write. A that specifies the value to write.

  Performs a volatile write to the specified address.

  The value is written atomically to the specified address with release semantics, meaning that the write is guaranteed to happen after any references to memory that occur prior to the execution. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the store CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` A reference to a that specifies the address in memory at which to write. A that specifies the value to write.

  Performs a volatile write to the specified address.

  The value is written atomically to the specified address with release semantics, meaning that the write is guaranteed to happen after any references to memory that occur prior to the execution. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the store CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` A reference to a that specifies the address in memory at which to write. A that specifies the value to write.

  Performs a volatile write to the specified address.

  The value is written atomically to the specified address with release semantics, meaning that the write is guaranteed to happen after any references to memory that occur prior to the execution. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the store CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` A reference to a that specifies the address in memory at which to write. A that specifies the value to write.

  Performs a volatile write to the specified address.

  The value is written atomically to the specified address with release semantics, meaning that the write is guaranteed to happen after any references to memory that occur prior to the execution. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the store CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` A reference to a that specifies the address in memory at which to write. A that specifies the value to write.

  Performs a volatile write to the specified address.

  The value is written atomically to the specified address with release semantics, meaning that the write is guaranteed to happen after any references to memory that occur prior to the execution. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the store CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  1
  RuntimeInfrastructure
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` A reference to a that specifies the address in memory at which to write. A that specifies the value to write.

  Performs a volatile write to the specified address.

  The value is written atomically to the specified address with release semantics, meaning that the write is guaranteed to happen after any references to memory that occur prior to the execution. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the store CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Void `` `` A reference to a that specifies the address in memory at which to write. A that specifies the value to write.

  Performs a volatile write to the specified address.

  The value is written atomically to the specified address with release semantics, meaning that the write is guaranteed to happen after any references to memory that occur prior to the execution. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the store CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` A reference to a that specifies the address in memory at which to write. A that specifies the value to write.

  Performs a volatile write to the specified address.

  The value is written atomically to the specified address with release semantics, meaning that the write is guaranteed to happen after any references to memory that occur prior to the execution. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the store CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Void `` `` A reference to a that specifies the address in memory at which to write. A that specifies the value to write.

  Performs a volatile write to the specified address.

  The value is written atomically to the specified address with release semantics, meaning that the write is guaranteed to happen after any references to memory that occur prior to the execution. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the store CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Void `` `` A reference to a that specifies the address in memory at which to write. A that specifies the value to write.

  Performs a volatile write to the specified address.

  The value is written atomically to the specified address with release semantics, meaning that the write is guaranteed to happen after any references to memory that occur prior to the execution. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the store CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Void `` `` A reference to a that specifies the address in memory at which to write. A that specifies the value to write.

  Performs a volatile write to the specified address.

  The value is written atomically to the specified address with release semantics, meaning that the write is guaranteed to happen after any references to memory that occur prior to the execution. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the store CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Void `` `` A reference to a that specifies the address in memory at which to write. A that specifies the value to write.

  Performs a volatile write to the specified address.

  The value is written atomically to the specified address with release semantics, meaning that the write is guaranteed to happen after any references to memory that occur prior to the execution. It is recommended that and be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the store CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size. For additional information, see Partition I of the CLI Specification.

  1
  RuntimeInfrastructure
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Boolean

  If this method succeeds, the rest of the thread's current time slice is yielded. The operating system schedules the calling thread for another time slice, according to its priority and the status of other threads that are available to run.

  Yielding is limited to the processor that is executing the calling thread. The operating system will not switch execution to another processor, even if that processor is idle or is running a thread of lower priority. If there are no other threads that are ready to execute on the current processor, the operating system does not yield execution, and this method returns false.

  This method is equivalent to using platform invoke to call the native Win32 SwitchToThread function. You should call the method instead of using platform invoke, because platform invoke bypasses any custom threading behavior the host has requested.

  Causes the calling thread to yield execution to another thread that is ready to run on the current processor. The operating system selects the thread to yield to.

  true if the operating system switched execution to another thread; otherwise, false.

0