Unsafe is no longer necessary for such cases. This can now be written as: Span<byte> stackSpan = stackalloc byte[100]; See https://github.com/dotnet/coreclr/pull/14503/files as an example.
Unsafe is no longer necessary for such cases. This can now be written as: Span<byte> stackSpan = stackalloc byte[100]; See https://github.com/dotnet/coreclr/pull/14503/files as an example.