byte[] ResultData = null;
DataSet ds = new DataSet();
ds.RemotingFormat = SerializationFormat.Binary;
MemoryStream ms = new MemoryStream();
IFormatter fm = new BinaryFormatter();
fm.Serialize(ms, ds);
ResultData = ms.ToArray();
ms.Close();
//Web Service远程传输
//反序列化
byte[] rResultData = null;
MemoryStream rms = new MemoryStream(rResultData);
IFormatter rbf = new BinaryFormatter();
object robj = rbf.Deserialize(rms);
DataSet rResultData = (DataSet)obj;
rms.Close();
return rResultData;