Table of Contents

Class CsvFieldWritingExtensions

Namespace
FlameCsv.Writing
Assembly
FlameCsv.Core.dll

Extensions for formatting values into CsvFieldWriter<T>

public static class CsvFieldWritingExtensions
Inheritance
CsvFieldWritingExtensions

Methods

FormatValue<T>(ref readonly CsvFieldWriter<byte>, T?, ReadOnlySpan<char>, IFormatProvider?)

Formats the value to the writer.

public static void FormatValue<T>(this ref readonly CsvFieldWriter<byte> writer, T? value, ReadOnlySpan<char> format = default, IFormatProvider? formatProvider = null) where T : struct, ISpanFormattable

Parameters

writer CsvFieldWriter<byte>

The writer to write to.

value T?

The value to format.

format ReadOnlySpan<char>

The format to use.

formatProvider IFormatProvider

The format provider to use.

Type Parameters

T

Remarks

Does not write a trailing delimiter.
Null values are not written, use WriteField<TValue>(CsvConverter<T, TValue>, TValue?) instead.

FormatValue<T>(ref readonly CsvFieldWriter<byte>, T, ReadOnlySpan<char>, IFormatProvider?)

Formats the value to the writer.

public static void FormatValue<T>(this ref readonly CsvFieldWriter<byte> writer, T value, ReadOnlySpan<char> format = default, IFormatProvider? formatProvider = null) where T : ISpanFormattable

Parameters

writer CsvFieldWriter<byte>

The writer to write to.

value T

The value to format.

format ReadOnlySpan<char>

The format to use.

formatProvider IFormatProvider

The format provider to use.

Type Parameters

T

Remarks

Does not write a trailing delimiter.
Null values are not written, use WriteField<TValue>(CsvConverter<T, TValue>, TValue?) instead.

FormatValue<T>(ref readonly CsvFieldWriter<char>, T?, ReadOnlySpan<char>, IFormatProvider?)

Formats the value to the writer.

public static void FormatValue<T>(this ref readonly CsvFieldWriter<char> writer, T? value, ReadOnlySpan<char> format = default, IFormatProvider? formatProvider = null) where T : struct, ISpanFormattable

Parameters

writer CsvFieldWriter<char>

The writer to write to.

value T?

The value to format.

format ReadOnlySpan<char>

The format to use.

formatProvider IFormatProvider

The format provider to use.

Type Parameters

T

Remarks

Does not write a trailing delimiter.
Null values are not written, use WriteField<TValue>(CsvConverter<T, TValue>, TValue?) instead.

FormatValue<T>(ref readonly CsvFieldWriter<char>, T, ReadOnlySpan<char>, IFormatProvider?)

Formats the value to the writer.

public static void FormatValue<T>(this ref readonly CsvFieldWriter<char> writer, T value, ReadOnlySpan<char> format = default, IFormatProvider? formatProvider = null) where T : ISpanFormattable

Parameters

writer CsvFieldWriter<char>

The writer to write to.

value T

The value to format.

format ReadOnlySpan<char>

The format to use.

formatProvider IFormatProvider

The format provider to use.

Type Parameters

T

Remarks

Does not write a trailing delimiter.
Null values are not written, use WriteField<TValue>(CsvConverter<T, TValue>, TValue?) instead.