O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required