GCHandle thisHandle = GCHandle.Alloc(this);//this 是 MyClass類型 IntPtr thisptr = GCHandle.ToIntPtr(thisHandle); GCHandle thisHandle = GCHandle.FromIntPtr(thisptr ); MyClass thisObject = (MyClass)thisHandle.Target;