Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
C#
/
Span<T> and Memory<T>
A method stores caller data, awaits I/O, then reads the data. Which parameter best expres…
from Span<T> and Memory<T>
C# 14 / .NET 10
intermediate
1 min
A method stores caller data, awaits I/O, then reads the data. Which parameter best expresses that contract?
`ReadOnlyMemory<byte>` with a documented retention period
`ReadOnlySpan<byte>` kept in a class field
`Span<byte>` captured by the async continuation
`byte*` because pointers provide automatic ownership
Check
Ask AI about this kata
Report an error
next kata
What does the read-only view print after the variable is rebound?
Predict the output
A new version is available
Reload