I want to change the names of the headers/columns from a csv file which I am reading from. Also I want to add new columns/headers.
My code so far is:
namespace CSV_Adapter
{
class Program
{
static void Main(string[] args)
{
using (var reader = new StreamReader(@"C:\Users\mrk\Desktop\output.csv"))
{
var csv = new CsvReader(reader);
//Read the Columns from CSV file
csv.Read();
csv.ReadHeader();
string[] headerRow = csv.Context.HeaderRecord;
}
}
}
}