Class MemberNameCollection
- Namespace
- CsvHelper.Configuration
- Assembly
- CsvHelper.dll
A collection that holds member names.
public class MemberNameCollection : IEnumerable<string>, IEnumerable
- Inheritance
-
MemberNameCollection
- Implements
- Inherited Members
Constructors
MemberNameCollection()
public MemberNameCollection()
Properties
Count
Gets the count.
public int Count { get; }
Property Value
this[int]
Gets the name at the given index. If a prefix is set, it will be prepended to the name.
public string this[int index] { get; set; }
Parameters
index
int
Property Value
Names
Gets the raw list of names without the prefix being prepended.
public List<string> Names { get; }
Property Value
Prefix
Gets the prefix to use for each name.
public string Prefix { get; set; }
Property Value
Methods
Add(string)
Adds the given name to the collection.
public void Add(string name)
Parameters
name
stringThe name to add.
AddRange(IEnumerable<string>)
Adds a range of names to the collection.
public void AddRange(IEnumerable<string> names)
Parameters
names
IEnumerable<string>The range to add.
Clear()
Clears all names from the collection.
public void Clear()
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<string> GetEnumerator()
Returns
- IEnumerator<string>
A IEnumerator<T> that can be used to iterate through the collection.