【转】.NET (C#) 中打印变量的内存地址

原文地址:https://my.oschina.net/sesametech/blog/1563905

GCHandle hander = GCHandle.Alloc(obj);
var pin = GCHandle.ToIntPtr(hander);
Debug.Print($"Device :{pin}");
posted @ 2023-04-18 09:20  SpringCore  阅读(286)  评论(0编辑  收藏  举报