Frank Niemeyer

My feedback

  1. 10 votes
    Vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      You have left! (?) (thinking…)
      8 comments  ·  F# Language  ·  Admin →
      Frank Niemeyer commented  · 

      @Sebastian: The only thing that F# is missing for this is the "fixed" statement (you'd have to pin the byte[] by allocating a GCHandle). The dereferencing (i.e. copy the contents of the byte array to a struct of type T) can achieved today using p |> NativePtr.toNativeInt |> NativePtr.ofNativeInt<'T> |> NativePtr.read.

    Feedback and Knowledge Base