The Easiest Way to Save and Share Code Snippets on the web

[ThreadStatic]

asm

last edit: Mar, 17th 2010 | jump to bottom

using System;
using System.Diagnostics;
 
namespace ConsoleApplication1
{
  class Program
  {
    [ThreadStatic]
    static int threadStatic;
    static int normalStatic;
 
    static void Main()
    {
      normalStatic = 1;
00000000  mov         dword ptr ds:[0024336Ch],1
 
      threadStatic = 2;
0000000a  mov         ecx,243374h 
0000000f  call        682C3DF2 
00000014  mov         dword ptr [eax],2 
 
      Debugger.Break();
0000001a  call        67DAD6B0 
0000001f  ret
270 views