TomlElement.ArrayEnumerator Struct
Definition
- Assembly
- Bodu.Text.Toml.dll
- Package
- Bodu.Text.Toml 1.0.0
Enumerates the elements of an array TomlElement in order.
public struct TomlElement.ArrayEnumerator : IEnumerable<TomlElement>, IEnumerable, IEnumerator<TomlElement>, IEnumerator, IDisposable
- Implements
- Inherited Members
- Extension Methods
Remarks
The enumerator walks the array's contiguous subtree rows, advancing past each element's whole subtree so that iteration costs one hop per element regardless of element complexity. It is a mutable struct; avoid copying it once enumeration has begun.
Properties
Current
Gets the element at the enumerator's current position.
public readonly TomlElement Current { get; }
Property Value
- TomlElement
The current element.
Methods
Dispose()
Releases the resources used by the enumerator. This enumerator holds no resources to release.
public readonly void Dispose()
GetEnumerator()
Returns this enumerator, enabling foreach over the array.
public readonly TomlElement.ArrayEnumerator GetEnumerator()
Returns
- TomlElement.ArrayEnumerator
This enumerator positioned before the first element.
MoveNext()
Advances the enumerator to the next element of the array.
public bool MoveNext()
Returns
Reset()
Resets the enumerator to its initial position, before the first element.
public void Reset()
Explicit Interface Implementations
IEnumerable<TomlElement>.GetEnumerator()
Returns this enumerator, enabling foreach over the array.
readonly IEnumerator<TomlElement> IEnumerable<TomlElement>.GetEnumerator()
Returns
- IEnumerator<TomlElement>
This enumerator positioned before the first element.
IEnumerable.GetEnumerator()
Returns this enumerator, enabling foreach over the array.
readonly IEnumerator IEnumerable.GetEnumerator()
Returns
- IEnumerator
This enumerator positioned before the first element.
IEnumerator.Current
Gets the element at the enumerator's current position.
readonly object IEnumerator.Current { get; }
Returns
- object
The current element, boxed.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |