how to read a csv file in c#

using System.IO;

static void Main(string[] args)
{
    using(var reader = new StreamReader(@"C:\test.csv"))
    {
        List<string> listA = new List<string>();
        List<string> listB = new List<string>();
        while (!reader.EndOfStream)
        {
            var line = reader.ReadLine();
            var values = line.Split(';');

            listA.Add(values[0]);
            listB.Add(values[1]);
        }
    }
}

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
.net read csv file open csv in c# how to csv file in C# how to csv file in C#] how to use csv C# c# get csv file best way to read a csv c# c# reading a csv file read .csv file in c# c# read cs file read data from csv file c# C# read in a CSV file how to read a csv file c# from file upload how to read a csv file c# from file uploaded how to read a csv file c# read csv using csvprocessor c# what is csv file in c# read csv file from folder in project c# read csv file from folder in c# C# read CSV file with headers C# CSV reader example c# how to read csv file c# read csv files c# read csv data read a csv file in c# by coloum csv file load in c# csv file c# how to read csv c# how to import a csv in C# how to open a csv in C# read in csv file c# c# how to open a csv file .csv file C# c# read in csv reading csv files c# csv read c# reading data from csv c# c# read a .csv fiel how to read csv file in using csv file url in c# how to read data from csv file in c# console application read csv from c# c# csv load from file c# read in project csv file how to read csv in c# csv file reading c# read csv file from ifile c# c# reading csv file read csv files c# read csv file with c# c# working with csv files C# read csv library reading csv in c# read csv file c# core readthrough csv file in c# read data from csv in c# can .net read a csv file c# read a csv file import csv file in c# read csv in c# c# open csv file read from csv file c# c# read file csv read and write csv file in c# read csv file csv c# .csv file open with c# c# load csv file read in a csv file c# c sharp read csv c# csv file c# csv read read data from csv file in c# c # load csv read from csv c# how to read csv file c# Load csv file csv c# get csv from folder in c# c# how to read csv c# open comma delimited file c# csv reader c# open csv how to read cvs file in c# c# opne csv read all content read csv c# tino array How to read csv files C# write value to csv file c# c# load csv read cshtml file in c# how to write query in c sharp to read csv best way to read csv file in c# read csv file in c# how to read data from csv file in c# read csv datei c# c# to read csv file read a csv in c# read first column of csv file and filter according to it c# store an array in csv c# c sharp read csv file C# reading csv c# import a csv file c# iterate csv file how to read csv file in c# c# read from csv foreach csv C# import csv file c# load data from csv c# how to read from csv file in c# c# read from csv file how to read csv file from link in c# reading from csv file c# how to read a csv file with C# reading csv file in c# read csv file ansi C# read csv c# readfile csv c# C# read csv reading csv file c# how to load csv file in c# read csv file data in c# read csv file path c# c# read and return data from csv how to read a CAV file in C# C# open csv file safely read a csv file in c# read csv file c# c# import csv c# read csv file read csv file in c sharp how to read a csv file in c#
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source