4.3序列化 serialization 1.总是标记未封装的类为[serializable] always mark non-sealed classes as serializable. 2.总是标记未序列化的成员变量为[non-serializable] always mark un-serializable member variables as non-serializable. 3.总是标记序列化类中的委托为[nonserialized] always mark delegates on a serialized class as non- serializable fields. [serializable] public class myclass { [field: nonserialized] public event eventhandler myevent; } ,欢迎访问网页设计爱好者web开发。