Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用CsvHelper但我希望能够序列化字段而不仅仅是属性。有没有办法做到这一点?
请注意,这很难搜索,因为文档使用“字段”一词来表示类属性,但我说的是实际的类字段,即MyIntField在这个类中:
MyIntField
class Something { public int MyIntProperty {get; set;} public int MyIntField; }
不,目前不可能。您收到一条错误消息
'MyIntField' is not a property. Did you try to map a field by accident?