Name

ThreadStaticAttribute

Synopsis

This attribute designates that a static field should not be shared between threads. Each thread receives a separate instance of this field and can set and retrieve values for it without causing potential synchronization problems. This also means that each thread has a copy of the static field that may contain different values.

public class ThreadStaticAttribute : Attribute {
// Public Constructors
   public method ThreadStaticAttribute();  
}

Hierarchy

ObjectAttributeThreadStaticAttribute

Valid On

Field

Get C# in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.