具有类型的属性的二进制序列化转换

时间:2018-09-20 23:47:06

标签: c# binary-serialization

当最初使用DateTime属性进行序列化时,我有二进制序列化的对象。现在,该属性已更改为DateTimeOffset。反序列化现在会引发异常

Object of type 'System.DateTime' cannot be converted to type 'System.DateTimeOffset'.

是否可以进行反序列化时转换为datetimeoffset?即自定义反序列化器或onDeserializtion或扩展名或属性...

感谢所有帮助

0 个答案:

没有答案