Class CsvHeader
- Namespace
- FlameCsv
- Assembly
- FlameCsv.Core.dll
Read-only CSV header record.
public sealed class CsvHeader : IEquatable<CsvHeader>
- Inheritance
-
objectCsvHeader
- Implements
Constructors
CsvHeader(CsvHeader)
Copy constructor for CsvHeader.
public CsvHeader(CsvHeader other)
Parameters
otherCsvHeader
CsvHeader(IEqualityComparer<string>, ImmutableArray<string>)
Initializes a new instance of the CsvHeader class.
public CsvHeader(IEqualityComparer<string> comparer, ImmutableArray<string> header)
Parameters
comparerIEqualityComparer<string>Comparer to use
headerImmutableArray<string>Header values
Properties
Comparer
The comparer used to compare header values.
public IEqualityComparer<string> Comparer { get; }
Property Value
HeaderPool
Contains the string pool for header values.
[EditorBrowsable(EditorBrowsableState.Never)]
[CLSCompliant(false)]
public static StringPool HeaderPool { get; }
Property Value
Values
Returns the header values.
public ImmutableArray<string> Values { get; }
Property Value
Methods
ContainsKey(string)
Returns true if the specified header is present.
public bool ContainsKey(string key)
Parameters
keystringHeader name
Returns
Equals(CsvHeader?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(CsvHeader? other)
Parameters
otherCsvHeaderAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
TryGetValue(string, out int)
Attempts to return the index of the specified header.
public bool TryGetValue(string key, out int value)