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
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про