Created
June 12, 2015 17:53
-
-
Save tophertimzen/1da2b0aab6245ed1c27b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public static object GetInstance(IntPtr ptrIN) | |
{ | |
object refer = ptrIN.GetType(); | |
IntPtr pointer = ptrIN; | |
unsafe | |
{ | |
*(&pointer - 1) = *(&pointer); | |
} | |
return refer; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment