c# - need help using CSVHelper package in Visual Studio 2012 -


i saw example here on stackoverflow, code goes this:

var csv = new csvhelper( file.openwrite( "some-file.csv" ) ); csv.writer.writerecords( mycustomobjectlist ); 

however, i'm unable instantiate csvhelper class, there isn't one, csvhelper namespace. there way above code working, or did install incorrectly? thanks

it looks example older version of csvhelper library. api changed quite bit between 1.x , 2.x, , there no longer csvhelper class. can instantiate csvreader , csvwriter classes directly (or there's csvfactory), above code this:

var csvwriter = new csvwriter(new streamwriter("some-file.csv")); csvwriter.writerecords(mycustomobjectlist) 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

c++ - End of file on pipe magic during open -