We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed
C# structs can have inline arrays like this:
unsafe struct Some { private fixed byte something[4]; }
But then something is typed as byte*. With Span<T> we should have a safe alternative. Something like:
something
byte*
Span<T>
ref struct Some { private fixed Span<byte> something[4]; }
This removes the unsafe keyword and lets us use Span<T> which embeds the length, making it safer.
unsafe
The text was updated successfully, but these errors were encountered:
This issue was moved to dotnet/csharplang#2208
Sorry, something went wrong.
No branches or pull requests
C# structs can have inline arrays like this:
But then
something
is typed asbyte*
. WithSpan<T>
we should have a safe alternative. Something like:This removes the
unsafe
keyword and lets us useSpan<T>
which embeds the length, making it safer.The text was updated successfully, but these errors were encountered: