d62075f5 332d f17f 2918 002e69445c68 - akesseler/Plexdata.CsvParser GitHub Wiki

CsvContainer.Item Property (Int32)

Gets and sets the list of column items at specified position.

Namespace: Plexdata.CsvParser.Processors
Assembly: Plexdata.CsvParser.NET (in Plexdata.CsvParser.NET.dll) Version: 1.1.3+d5bef99aa35461ce4bafadf0bf2c2aeca18044ea

Syntax

C#

public IEnumerable<string> this[
	int column
] { get; set; }

Parameters

 

column
Type: System.Int32
The zero-based index of the column to get.

Property Value

Type: IEnumerable(String)
An enumerable list of column items.

Return Value

Type: IEnumerable(String)
The whole list of column items or null if not found.

Remarks

This getter validates provided column number and if valid it returns the column as enumerable list. But null is returned if provided column index is either less than zero or greater than total column count.

The setter instead tries to change all affected elements at provided column. Only possible elements are overwritten by its new content in case of source list is longer than referenced column. In contrast to that all remaining elements are reset to null in case of source list is shorter than referenced column.

Additionally please note that nothing will happen if the source list is null or empty.

Attention: Any existing column header might be overwritten if new column content does not contain the original header!

See Also

Reference

CsvContainer Class
Item Overload
Plexdata.CsvParser.Processors Namespace

⚠️ **GitHub.com Fallback** ⚠️