.NET中的数据成员还有序列化方法吗? [英] Are methods also serialized along with the data members in .NET?
本文介绍了.NET中的数据成员还有序列化方法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
类型信息与状态一起被序列化。为了反序列化数据,您的程序将需要访问包含类型(包括方法)的程序集。
The title is obvious, I need to know if methods are serialized along with object instances in C#, I know that they don't in Java but I'm a little new to C#. If they don't, do I have to put the original class with the byte stream(serialized object) in one package when sending it to another PC? Can the original class be like a DLL file?
解决方案
No. The type information is serialized, along with state. In order to deserialize the data, your program will need to have access to the assemblies containing the types (including methods).
这篇关于.NET中的数据成员还有序列化方法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文