How can I display a pointer address in C#?
Remember that with managed code the garbage collector is free to move things around on you. Make sure to pin your object down if your in a situation where the address matters.
Console.WriteLine(new IntPtr(cp));