ReadOnlySpan<T>.GetEnumerator ReadOnlySpan<T>.GetEnumerator ReadOnlySpan<T>.GetEnumerator ReadOnlySpan<T>.GetEnumerator Method

定义

返回用于此 ReadOnlySpan<T> 的枚举器。Returns an enumerator for this ReadOnlySpan<T>.

public:
 ReadOnlySpan<T>::Enumerator GetEnumerator();
public ReadOnlySpan<T>.Enumerator GetEnumerator ();
member this.GetEnumerator : unit -> ReadOnlySpan<'T>.Enumerator
Public Function GetEnumerator () As ReadOnlySpan(Of T).Enumerator

返回

用于此只读范围的枚举器。An enumerator for this read-only span.

注解

GetEnumerator C# 可以foreach使用语句和 Visual Basic For Each...,而不是直接调用方法。用于枚举的ReadOnlySpan<T>构造。 NextInstead of calling the GetEnumerator method directly, you can use the C# foreach statement and the Visual Basic For Each...Next construct to enumerate a ReadOnlySpan<T>.

适用于