Search code examples
c#multithreadingcompact-framework

ThreadStatic for .net compact framework


How can we reproduce ThradStatic behavior in .net compact framework 3.5 ?


Solution

  • I would suggest a static (in this case appdomain static) dictionary indexed by the thread id with associated getters and setters thtat index into the dictionary using Thread.Current.