How do you get the address of an object as an nativeptr in F#?

71 Views Asked by At

I am trying to implement a part of F# code that could benefit from using pointers. Unfortunately, the documentation around unsafe code is poor for the language. I couldn't find any way to properly manage ilsigptr<T>, because nothing else seems to be able to convert to it. I tried using a byref<T>, since that is what the & operator returns, but those aren't allowed as members. nativeptr<T> looks promising, but it doesn't have any ofByRef function.

Thank you in advance for your help, this has been driving me nuts.

0

There are 0 best solutions below

Related Questions in F#