ericqliu

路在奋斗者的脚下延伸......

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::
        public static byte[] BinarySerialize(object obj)
        {
            BinaryFormatter serialize = new BinaryFormatter();
            MemoryStream stream = new MemoryStream();
            serialize.Serialize(stream, obj);
            return stream.ToArray();
        }

 

posted on 2012-12-27 13:22  ericqliu  阅读(103)  评论(0)    收藏  举报