Ajay Kelkar
Ajay Kelkar

Reputation: 4621

Are static variables with [ThreadStatic] attribute shared between AppDomains

I have a variable named as [ThreadStatic] , will it shared across 2 app domains?

Upvotes: 4

Views: 803

Answers (1)

Jon Skeet
Jon Skeet

Reputation: 1500785

No. Effectively types in different AppDomains are completely separate types. The static variables are unrelated to each other, whether or not [ThreadStatic] is applied.

Upvotes: 9

Related Questions