Last active
June 4, 2017 05:58
-
-
Save christiannagel/29efe7c365fcb09ac77abfdaa8a28b0f to your computer and use it in GitHub Desktop.
Show memory address of array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsafe private static void ShowAddress(string name, int[] item) | |
{ | |
fixed (int* addr = item) | |
{ | |
Console.Write($"\t0x{(ulong)addr:X}"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment