docs.unity.cn
    Show / Hide Table of Contents

    Struct UnsafeList<T>.Enumerator

    An enumerator over the elements of a list.

    Namespace: Unity.Collections.LowLevel.Unsafe
    Syntax
    public struct Enumerator : IEnumerator<T>, IDisposable, IEnumerator
    Remarks

    In an enumerator's initial state, Current is invalid. The first MoveNext() call advances the enumerator to the first element of the list.

    Properties

    Current

    The current element.

    Declaration
    public readonly T Current { get; }
    Property Value
    Type Description
    T

    The current element.

    Methods

    Dispose()

    Does nothing.

    Declaration
    public void Dispose()

    MoveNext()

    Advances the enumerator to the next element of the list.

    Declaration
    public bool MoveNext()
    Returns
    Type Description
    Boolean

    True if Current is valid to read after the call.

    Remarks

    The first MoveNext call advances the enumerator to the first element of the list. Before this call, Current is not valid to read.

    Reset()

    Resets the enumerator to its initial state.

    Declaration
    public void Reset()
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, June 14, 2022
    Terms of use