Are methods also serialized along with the data members in .NET?

前端 未结 4 2029
执念已碎
执念已碎 2020-12-06 11:29

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

4条回答
  •  星月不相逢
    2020-12-06 12:17

    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).

提交回复
热议问题