Skip to content

Instantly share code, notes, and snippets.

@exts
Last active December 20, 2016 02:17
Show Gist options
  • Save exts/5a5ba330301502f9ce638b675bf6513b to your computer and use it in GitHub Desktop.
Save exts/5a5ba330301502f9ce638b675bf6513b to your computer and use it in GitHub Desktop.
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