Table of Contents

Struct CsvRecordRef<T>

Namespace
FlameCsv.Reading
Assembly
FlameCsv.Core.dll

Internal implementation detail. This type should not be used directly.

[EditorBrowsable(EditorBrowsableState.Never)]
public readonly ref struct CsvRecordRef<T> : ICsvRecord<T> where T : unmanaged, IBinaryInteger<T>

Type Parameters

T
Implements

Properties

FieldCount

Gets the number of fields in the record.

public int FieldCount { get; }

Property Value

int

this[int]

Returns the field at index.

public ReadOnlySpan<T> this[int index] { get; }

Parameters

index int

Zero-based index of the field to get.

Property Value

ReadOnlySpan<T>

Remarks

The span is only guaranteed to be valid until another field or the next record is read.

Exceptions

IndexOutOfRangeException

Thrown if index is less than 0 or greater than or equal to FieldCount

RawValue

Data of the raw record, not including possible trailing newline.

public ReadOnlySpan<T> RawValue { get; }

Property Value

ReadOnlySpan<T>

Methods

GetRawSpan(int)

Returns the raw unescaped span of the field at the specified index.

public ReadOnlySpan<T> GetRawSpan(int index)

Parameters

index int

0-based field index

Returns

ReadOnlySpan<T>

Exceptions

IndexOutOfRangeException

Thrown if index is less than 0 or greater than or equal to FieldCount

GetRecordLength()

Returns length of the raw record, not including possible trailing newline.

public int GetRecordLength()

Returns

int

ToString()

Returns a diagnostic string representation of the current instance.

public override string ToString()

Returns

string

Remarks

See RawValue to get the actual record span.