Closed Hazy87 closed 2 years ago
Thanks a lot for the contribution. I think tomorrow I will have a look into this.
Looking good. The missing piece was the NumberStyles.Currency
which I could simply add to the DecimalConverter
in line 67. I will nevertheless take over your implementation.
To give some background: The TinyCsvParser
package has custom Converter implemented, that's the reason why I used the DecimalConverter
class. Surprisingly after checking the code of DecimalConverter
it's also just doing a decimal.TryParse
without any further special things.
Hence I take over your approach which I more prefer.
Switched to using decimal.TryParse which should nicely remove any currency from the string. Fixes #83