Use the proper Unsafe feature in the csproj