I'm using the latest version on Nuget which is a beta I believe.
Sadly I cannot get the headers to work and have this issue- "IgnoreHeaderWhiteSpace is not a member of ICsvReaderConfiguration".

This applies to the version 3 prerelease! If I ditch prereleases and go to the latest stable, this problem goes away.
In the 3.0 pre-release there is now Configuration.PrepareHeaderForMatch which is a Func<string, string>. This allows you to do whatever you want to the header.
There were 3 header manipulations and someone was asking for another, so it made sense to merge it into a function.
If you want to ignore white space, you could do something like
Configuration.PrepareHeaderForMatch = header => header.Replace( ' ', '' );
Must confess I find this easier to work with in the current stable:
With csv.Configuration
.HasHeaderRecord = True
.TrimHeaders = True
.IgnoreHeaderWhiteSpace = True
End With
Anyway, thank you for coming back to me Josh!
Sure, but there is an infinite number of configurations that could be added. Every one of those configurations needs special code to handle it too. It's not very flexible and a pain to maintain. This gives the consumer complete control over what they want to do and doesn't require a new feature request if a new config comes up. You can easily do things using a Regex also.
Hopefully it's not too much of a burden for you. ;)
It's no problem for my current use case - the previous version is working well.
I'll change it if I have to but it's not likely for this specific project.
You'd laugh if you saw how I have it implemented anyway: I am simply using getField/Trygetfield and manually building the objects that way.
I'm sure I'll do something more sophisticated in a future project!
Are you at least taking advantage of type conversion? Meaning Get<int>( 0 ) will return an int. I saw someone recently doing int.Parse( csv.Get( 0 ) ).
Told you, you'd laugh : Dim recordNo = CInt(csv.GetField("RECORDNO"))
As it's the only Int in the object I need, the rest are strings from a very old Topspeed file conversion.
Now that you've mentioned that, I can use that. Just think, VB code done a bit quick to try something out :).
If I'd had oodles of time, I should have done most of this via F#!
Thanks for the heads up though. Found it now: csv.GetField(Of Integer)("RECORDNO")
This library is meant to do pretty much everything for you in the simplest possible manner. If you just do csv.GetRecords<MyCustomType>() it will automatically use header columns to match up with property names of your class object, or if there is no header, it'll use the order of the fields with the order of the properties (which isn't guaranteed in .NET, so you should always explicitly use a column index if there is not header). The code is generated on the fly using lambda expressions and compiled, so it runs as fast as if you were to write the new objects and set the properties yourself.
F# is something I've wanted to learn for a long time. Some day it'll happen.
Given how you wrote this, you'll take to it like a duck to water mate.
I'm slightly rusty due to my day job just not requiring it - everything is legacy winforms and sql here.
I've a few snippets and things in F# on my Github account; it's a nice compact language for a lot of stuff. The only thing I miss is designer integration in winforms/wpf. But that's partly because MS thinks old school desktop stuff is history.
:)
I'm stuck with using the headernames as I've 3 separate files that do use the names but the columns are in different orders.
The columns in each CSV are different - there are dozens of spare columns that the original developers left in. So it don't match the objects at all, hence the manual work rather than doing things in a more fluent fashion.
How about providing a few "out of the box" functions e.g. the header => header.Replace( ' ', '' ); that you mention? If you agree with the principal, I'll log a PR.
I'm not opposed to this. I think I could do this with a few of the other functions too. Can you log a new issue with a list of the functions you would like to see?