Table of Contents

Class CountBytesAttribute

Namespace
CsvHelper.Configuration.Attributes
Assembly
CsvHelper.dll

A value indicating whether the number of bytes should be counted while parsing. This will slow down parsing because it needs to get the byte count of every char for the given encoding. The Encoding needs to be set correctly for this to be accurate.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public class CountBytesAttribute : Attribute, IClassMapper
Inheritance
CountBytesAttribute
Implements
Inherited Members

Constructors

CountBytesAttribute(bool)

A value indicating whether the number of bytes should be counted while parsing. This will slow down parsing because it needs to get the byte count of every char for the given encoding. The Encoding needs to be set correctly for this to be accurate.

public CountBytesAttribute(bool countBytes = true)

Parameters

countBytes bool

Properties

CountBytes

A value indicating whether the number of bytes should be counted while parsing. This will slow down parsing because it needs to get the byte count of every char for the given encoding. The Encoding needs to be set correctly for this to be accurate.

public bool CountBytes { get; }

Property Value

bool

Methods

ApplyTo(CsvConfiguration)

public void ApplyTo(CsvConfiguration configuration)

Parameters

configuration CsvConfiguration