Struct CsvReader.RecordEnumerator
Supports a simple iteration over the records of a CsvReader.
Implements
System.Collections.Generic.IEnumerator<System.String[]>
System.Collections.IEnumerator
System.IDisposable
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Mars.Common.IO.Csv
Assembly: Mars.IO.dll
Syntax
public struct RecordEnumerator : IEnumerator<string[]>, IEnumerator, IDisposable
Constructors
| Improve this Doc View SourceRecordEnumerator(CsvReader)
Initializes a new instance of the RecordEnumerator class.
Declaration
public RecordEnumerator(CsvReader reader)
Parameters
Type | Name | Description |
---|---|---|
CsvReader | reader | The CsvReader to iterate over. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
reader is a null.
|
Properties
| Improve this Doc View SourceCurrent
Gets the current record.
Declaration
public readonly string[] Current { get; }
Property Value
Type | Description |
---|---|
System.String[] |
Methods
| Improve this Doc View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
MoveNext()
Advances the enumerator to the next record of the CSV.
Declaration
public bool MoveNext()
Returns
Type | Description |
---|---|
System.Boolean | true if the enumerator was successfully advanced to the next record, false if the enumerator has passed the end of the CSV. |
Reset()
Sets the enumerator to its initial position, which is before the first record in the CSV.
Declaration
public void Reset()
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerator.Current
Gets the current record.
Declaration
readonly object IEnumerator.Current { get; }
Returns
Type | Description |
---|---|
System.Object |
Implements
System.Collections.Generic.IEnumerator<T>
System.Collections.IEnumerator
System.IDisposable