如何使无.NET序列化attibute一类可序列化

编程入门 行业动态 更新时间:2024-10-10 09:21:59
本文介绍了如何使无.NET序列化attibute一类可序列化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个调试器可视化的看到数据表的形式类对象的列表。但是,限制为code是这个类是可序列化,即应被标记为[Serializable接口]如果该类没有标记序列化,然后调试器崩溃。所以,有谁能够告诉我如何使一个类可序列化在运行时,如果该类没有标记序列化。

I have one debugger visualizer for seeing list of class object in the form of data table. But the limitation for the code is that the class should be serializable i.e. should be marked as [Serializable] and if the class is not marked Serializable then the debugger crashes. So, can anybody tell me how to make a class Serializable at run time if the class is not marked Serializable.

谢谢 Ashwani

Thanks Ashwani

推荐答案

如果一个类没有标记 [Serializable接口] ,您可以使用的 SerializationSurrogate

If a class is not marked [Serializable], you can try serialization using SerializationSurrogate

更多推荐

如何使无.NET序列化attibute一类可序列化

本文发布于:2023-11-11 08:49:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1577937.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:序列化   NET   attibute

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!