Using FileHelpers, I decorated a class with [DelimitedRecord(",")] and was going to output an enumeration of objects of that type as CSV. But, it didn't work because my class inherits from ActiveRecordLinqBase<T>, which caused some problems.
So, I was wondering if I could just select an enumeration of anonymous types and somehow have filehelpers generate csv from that. I don't like having to define a class just for FileHelpers to output csv.
I would be open to using another csv library, but FileHelpers is proven.
EDIT
@Foovanadil: This would be the sort of thing I am trying to do:
CreateCSV(MyCollection.Select(x=>new{
x.Prop1,
x.Prop2,
x.Prop3
}));
Gives you:
Prop1,Prop2,Prop3
val1a,val2a,val3a,
val1b,val2b,val3b,
etc.....