Last active
November 19, 2017 05:59
-
-
Save naveed-ahmad-biz/a953a5af859ad1202309c70a08c9168b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using FileHelpers; | |
namespace MyProject | |
{ | |
[DelimitedRecord(",")] | |
[IgnoreEmptyLines()] | |
[IgnoreFirst()] | |
public class MyProduct | |
{ | |
//Name | |
public string Name{ get; set; } | |
//Description, this attribute will handle the double quotes issue | |
[FieldQuoted('"', QuoteMode.OptionalForBoth)] | |
public string Description{ get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment