0
IgnoreFirst(int)或IgnoreLast(int)僅將固定數量的行忽略爲頁眉或頁腳。但我喜歡忽略或註釋txt/csv文件中的特定行。比如像下面(忽略某些段落或TXT/CSV特定行):如何使用FileHelpers評論或忽略txt文件中的某一行
############# This is a comment ##########
/* Some comment paragraph
some more comments
last line of comment */
1,Foo,FooItem1
2,Foo,FooItem2
3,Goo,GooItem3
#4,Doo,DooItem4 <-- ignore.
5,Eoo,EooItem5
我看了一下BeforeReadRecord和SkipThisRecord可能潛在地解決這個問題,但文檔是作爲圖像一樣簡單,沒有解釋也沒有提供一個例子。