IsEmpty
public bool IsEmpty { get; }Whether the value is empty.
Ref struct in CsvHelper
One field of the current record. The value is already unquoted and unescaped.
public readonly ref struct CsvFieldCsvHelperCsvHelper.dllpublic bool IsEmpty { get; }Whether the value is empty.
public int Length { get; }The length of the value in bytes.
public ReadOnlySpan<byte> Span { get; }The field value as UTF-8 bytes. Valid until the next read.
net10.0
public T Parse<T>() where T : ISpanParsable<T>Parses the value as T. See CsvReader.Parse<T>(int).
TT.T.T is not one of the built-in types.netstandard2.1, netstandard2.0, net47
public T Parse<T>()Parses the value as T. See CsvReader.Parse<T>(int).
TT.T.T is not one of the built-in types.public T Parse<T>(Func<string, IFormatProvider, T> parser)Parses the value with parser, which gets it as a string and the reader's format provider.
Tparser returns.parserFunc<string, IFormatProvider, T>parser returns.parser is null.net10.0
public T? ParseOrNull<T>() where T : struct, ISpanParsable<T>Parses the value as T, or returns null if it is empty, one of CsvReaderOptions.NullValues or invalid.
Tnull when the value is null or not a valid T.T is not one of the built-in types.netstandard2.1, netstandard2.0, net47
public T? ParseOrNull<T>() where T : structParses the value as T, or returns null if it is empty, one of CsvReaderOptions.NullValues or invalid.
Tnull when the value is null or not a valid T.T is not one of the built-in types.public T? ParseOrNull<T>(CsvTryParser<T> parser) where T : structParses the value with parser, or returns null if it is empty, one of CsvReaderOptions.NullValues, or parser fails.
Tparser parses.parserCsvTryParser<T> where T : structnull when the value is null or parser fails.parser is null.public override string ToString()Gets the value as a string. See CsvReader.GetString(int).
net10.0
public bool TryParse<T>(out T value) where T : ISpanParsable<T>Tries to parse the value as T. See CsvReader.Parse<T>(int).
TvalueTT when parsing fails.T is not one of the built-in types.netstandard2.1, netstandard2.0, net47
public bool TryParse<T>(out T value)Tries to parse the value as T. See CsvReader.Parse<T>(int).
TvalueTT when parsing fails.T is not one of the built-in types.public bool TryParse<T>(CsvTryParser<T> parser, out T value)Tries to parse the value with parser, which gets it as a string and the reader's format provider.
Tparser parses.parserCsvTryParser<T>valueTparser produced.parser: whether the value could be parsed.parser is null.