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

由网友(葬你以风)分享简介:我有一个调试器可视化的看到数据表的形式类对象的列表。但是,限制为code是这个类是可序列化,即应被标记为[Serializable接口]如果该类没有标记序列化,然后调试器崩溃。所以,有谁能够告诉我如何使一个类可序列化在运行时,如果该类没有标记序列化。I have one debugger visualizer for...

我有一个调试器可视化的看到数据表的形式类对象的列表。但是,限制为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

阅读全文

相关推荐

最新文章