在C#中输出变量的地址

int a = 3;

GCHandle handle = GCHandle.Alloc(a);

var pin = GCHandle.ToIntPtr(handle);

Console.WriteLine(pin);

posted @ 2017-02-24 10:15  邯郸小飞哥  阅读(1324)  评论(0编辑  收藏  举报