Skip to content

Instantly share code, notes, and snippets.

@naveed-ahmad-biz
Last active November 19, 2017 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naveed-ahmad-biz/a953a5af859ad1202309c70a08c9168b to your computer and use it in GitHub Desktop.
Save naveed-ahmad-biz/a953a5af859ad1202309c70a08c9168b to your computer and use it in GitHub Desktop.
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