111,097
社区成员




//将byte存为流
MemoryStream stream = new MemoryStream();
BinaryFormatter _Formatter = new BinaryFormatter();
stream.Write(yourDataArray, 0, yourDataArray.Length);
stream.Position = 0;
//将流转换为对象
object obj = _Formatter.Deserialize(stream);
//关闭流
stream.Close();
MemoryStream stream = new MemoryStream();
BinaryFormatter _Formatter = new BinaryFormatter();
stream.Write(yourDataArray, 0, yourDataArray.Length);
stream.Position = 0;
object obj = _Formatter.Deserialize(stream);
stream.Close();
其中yourDataArray是你的byte[]数组
把obj写入xml文件
http://msdn.microsoft.com/zh-cn/library/b85344hz(v=VS.90).aspx