Code to covert DataSet in bytes
public static byte[] ConvertDataSetToByte(DataSet dataSet) {
BinaryFormatter binaryFormatter = new BinaryFormatter();
using(MemoryStream memoryStream = new MemoryStream()) {
binaryFormatter.Serialize(memoryStream, dataSet);
return memoryStream.GetBuffer();
}
November 27, 2006
Converting DataSet to Bytes
at 11/27/2006
Tags: .NET