MemoryExtensions.AsBytes<T>(Memory<T>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public static Memory<byte> AsBytes<T> (this Memory<T> memory) where T : struct;
static member AsBytes : Memory<'T (requires 'T : struct)> -> Memory<byte> (requires 'T : struct)
<Extension()>
Public Function AsBytes(Of T As Structure) (memory As Memory(Of T)) As Memory(Of Byte)
Type Parameters
- T
The type if items in the source Memory<T>.
Parameters
Returns
A Memory<T> of bytes.
Exceptions
Thrown when the data store of memory
is not supported.