Mono Class Library: System Namespace

System.ThreadStaticAttribute Class

Indicates that there is a unique instance of the designated static field for each thread. [Edit]

See Also: ThreadStaticAttribute Members

System.Object
     System.Attribute
          System.ThreadStaticAttribute

[System.AttributeUsage(System.AttributeTargets.Field, Inherited=false)]
[System.Runtime.InteropServices.ComVisible(true)]
public class ThreadStaticAttribute : Attribute

Remarks

A static field marked with this attribute is not shared between threads. Each executing thread has a separate instance of the field, and independently sets and gets values for that field.

Note:

Do not specify initial values for fields marked with this attribute, because such initialization occurs only once, when the class constructor executes, and therefore affects only one thread. If you do not specify an initial value, you can rely on the field being initialized to its default value if it is a value type, or to null if it is a reference type.

[Edit]

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0