标签:int ring handle str rom from free class string
struct aa { public string a; public string b; } aa p = new aa(); p.a = "1"; p.b = "1"; //对象转IntPtr var handle = GCHandle.Alloc(p); var ptr = GCHandle.ToIntPtr(handle); //IntPtr转对象 var a = GCHandle.FromIntPtr(ptr) .Target; handle.Free();
标签:int ring handle str rom from free class string
原文地址:https://www.cnblogs.com/Angel-szl/p/13152629.html