Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've never used C# Inhetitable thread local, but understand that they are the rough equivalent of Java Inhetitable thread local.

If I proceed what do I need to know? What's going to be the same? Different? What's going to bite me?

As for as my research i found that

.NET 4.0 introduced ThreadLocal

i just want to know which versions of dotnet supports it?

It is appreciated that if i got any samples or documents to read

Waiting for your valuable response and comments
Posted

1 solution

Looks like only .NET 4.0 supports ThreadLocal

here is some
sample code
 
Share this answer
 
Comments
gowthammanju 11-Jun-12 1:47am    
IS IT POSSIBLE TO IMPLEMENT INHERITABLE THREAD LOCAL IN C# .NET
John Orendt 11-Jun-12 2:29am    
First, ask yourself, which methods of class ThreadLocal do you need? How hard will it be to implement them? Or describe why and what for you need class ThreadLocal, then we can give more detailed advice.
Vijaykumar Vadnal 23-Mar-18 9:30am    
@John Orendt, I have same question here, I want inheritable ThreadLocal in my project, my project already configured to use IoC using CastleWindsor. Hence here I have clear case to implement that somewhere in my class to resolve its dependency and get instance for my further use. Could you please help me here how to do this?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900