public sealed class ThreadStaticAttribute: Attribute
Object
Attribute
ThreadStaticAttribute
mscorlib
BCL
Indicates that there is a unique instance of the designated static field for each thread.
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.]
AttributeUsageAttribute(AttributeTargets.Field, AllowMultiple=false, Inherited=false)
System Namespace
ThreadStaticAttribute Constructors
public ThreadStaticAttribute()
Constructs and initializes a new instance of the ThreadStaticAttribute class.
System.ThreadStaticAttribute Class, System Namespace