How I can get an Intptr pointer of integer value?
I was trying to do that it work. Are any other variants?
GCHandle gCHandle = GCHandle.Alloc (size, GCHandleType.Pinned);
IntPtr sizePtr = gCHandle.AddrOfPinnedObject ();
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Only objects of a reference types can be pinned, int is a value type.
You can get a pointer to an int that’s a local variable in a method: