Ray's playground

 

Item 27: Prefer Making Your Types Serializable(Effective C#)

The .NET Framework provides a simple, standard algorithm for serializing your objects. If your type should be persisted, you should follow the standard implementation. If you don’t support serialization in your types, other classes that use your type can’t support serialization, either. Make it as easy as possible for clients of your class. Use the default methods when you can, and implement the ISerializable interface when the default attributes don’t suffice.

posted on 2011-02-17 21:13  Ray Z  阅读(233)  评论(0编辑  收藏  举报

导航