是否有像 FieldQuotes 这样的属性可以应用于属性?
此外,是否可以自动将 FieldQuotes 添加到所有字段,这样我就不必为每个字段定义它?
您要查找的属性是FieldQuoted
. 文档在这里。
一些例子:
[FieldQuoted()] // Quoted with "
public string CustomerName
[FieldQuoted('[')] // Quoted between [brackets]
public string CustomerName
[FieldQuoted('"', QuoteMode.OptionalForBoth)] // Optional quoted when read or write
public string CustomerName
[FieldQuoted('"', MultilineMode.AllowForBoth)] // Indicates that the quoted string can span multiple lines
public string CustomerName
您确实需要申请每个领域。