Allow passing ReadOnlySpan<byte>
to Marshal.Copy
#9029
Replies: 1 comment
-
API requests go in @dotnet/runtime. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Not sure whether this repo is the right place to report this, but I recently discovered that
Marshal.Copy
only takesbyte[]
and notReadOnlySpan<byte>
. Any reason the former can't be allowed as well?I know I can just call
ToArray()
on the span to pass it, but the extra copy to a reference type might not always be desirable.Beta Was this translation helpful? Give feedback.
All reactions