摘要:
二进制序列化: 序列化就是将对象从内存中移到硬盘(使用FileStream)或者向网络(使用NetWorkStream)中传送。可认为是格式化数据。 1 使用时先添加命名空间: using System.Runtime.Serialization.Formatters.Binary; 2 BinaryFormatter bf = new BinaryFormatter(); 实例化 3 使用 [Serializable] 标记,将它添加到要序列化的对象上; 例1:[Serializable] class Person { public int Num; public st... 阅读全文
posted @ 2012-07-03 23:06
梁彦伟
阅读(342)
评论(0)
推荐(0)
浙公网安备 33010602011771号