I have an unsafe byte* pointing to a native byte array of known length. How can I convert it to byte[]?
An unsafe sbyte* pointing to a zero-terminated native string can be converted to a C# string easily, because there is a conversion constructor for this purpose, but I can't find a simple way to convert byte* to byte[].