MemoryMarshal.ToEnumerable<T>(ReadOnlyMemory<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.
Creates an IEnumerable<T> view of the given read-only memory buffer.
public:
generic <typename T>
static System::Collections::Generic::IEnumerable<T> ^ ToEnumerable(ReadOnlyMemory<T> memory);
public static System.Collections.Generic.IEnumerable<T> ToEnumerable<T> (ReadOnlyMemory<T> memory);
static member ToEnumerable : ReadOnlyMemory<'T> -> seq<'T>
Public Shared Function ToEnumerable(Of T) (memory As ReadOnlyMemory(Of T)) As IEnumerable(Of T)
Public Shared Iterator Function ToEnumerable(Of T) (memory As ReadOnlyMemory(Of T)) As IEnumerable(Of T)
Type Parameters
- T
The type of the items in the read-only memory buffer.
Parameters
- memory
- ReadOnlyMemory<T>
A read-only memory buffer.
Returns
An enumerable view of memory
.
Remarks
This method allows a read-only memory buffer to be used in existing APIs that require a parameter of type IEnumerable<T>.
Applies to
Tehke meiega GitHubis koostööd
Selle sisu allika leiate GitHubist, kus saate ka probleeme luua ja läbi vaadata ning päringuid teha. Lisateavet leiate meie kaasautorite juhendist.