Skip to content

Instantly share code, notes, and snippets.

@exts
Last active Dec 20, 2016
Embed
What would you like to do?
namespace CvsProject
{
internal class Program
{
public static void Main(string[] args)
{
var filename = "csvfile.csv";
var reader = new CsvReader(filename);
reader.ParseContent();
if(reader.CsvData.Count > 0) {
foreach(var line in reader.CsvData) {
WriteLine(String.Join(", ", line.ToArray()));
}
}
}
}
}
vs
//forcefully formatted
namespace CvsProject
{
internal class Program
{
public static void Main(string[] args)
{
var filename = "csvfile.csv";
var reader = new CsvReader(filename);
reader.ParseContent();
if (reader.CsvData.Count > 0)
{
foreach (var line in reader.CsvData)
{
WriteLine(String.Join(", ", line.ToArray()));
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment