Helliaca / CSV2List

Simple, lightweight C# library to read and write Lists of objects to CSV files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSV2List

Simple, lightweight C# library to read and write Lists of objects to CSV files.

(C# 2.1+)

Usage

C# Datacontainer class:

public class MyDataContainer
{
    [CSV2List.CSVField("id")]
    public int id;

    [CSV2List.CSVField("name")]
    public string name;
}

CSV file:

id;name
1;robert
52;sarah
32;philip

Reading/Writing:

List<MyDataContainer> myList = CSVReader.ReadFromCSV<MyDataContainer>("my_file.csv");

myList[1].id = 42;

CSVWriter.WriteToCSV(myList, "output/my_corrected_file.csv");

About

Simple, lightweight C# library to read and write Lists of objects to CSV files.

License:Creative Commons Zero v1.0 Universal


Languages

Language:C# 100.0%