Skip to content

Instantly share code, notes, and snippets.

@christiannagel
Last active June 4, 2017 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save christiannagel/29efe7c365fcb09ac77abfdaa8a28b0f to your computer and use it in GitHub Desktop.
Save christiannagel/29efe7c365fcb09ac77abfdaa8a28b0f to your computer and use it in GitHub Desktop.
Show memory address of array
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