我正在尝试通过FieldConverter属性设置我正在读取的CSV文件的日期格式,但我收到以下错误 –
Attribute ‘FieldConverter’ is not valid on this declaration type. It
is only valid on ‘field’ declarations.@H_301_5@
知道为什么会发生这种情况以及如何解决这个问题吗?@H_301_5@ @H_403_9@[DelimitedRecord(",")] [IgnoreFirst(1)] public class Someviewmodel { public int account { get; set; } [FieldConverter(ConverterKind.Date,"dd-MM-yyyy")] public DateTime doc_dte { get; set; } }