Here is the code that can be used for converting a DataSet into its corresponding byte array. Sometimes when we need to send the data across the network through WCF service, we can get advantage of sending our data into a byte array. The reason behind to send the data in Byte Array format is that byte array is the one of the primitive data type available in .Net
private byte[] ConvertDataSetToByteArray(DataSet dataSet)
{
byte[] binaryDataResult = null;
using (MemoryStream memStream = new MemoryStream())
{
BinaryFormatter brFormatter = new BinaryFormatter();
dataSet.RemotingFormat = SerializationFormat.Binary;
brFormatter.Serialize(memStream, dataSet);
binaryDataResult = memStream.ToArray();
}
return binaryDataResult;
}

Hemant SrivastavaPosted Feb 12, 2018, 3:53 PM
Http://hemant-srivastava.blogspot.com/2013/03/c-code-to-deserialize-bytearray-into.html
Hemant SrivastavaPosted Feb 12, 2018, 3:52 PM
Hi Anbu.To convert Byte[] into dataTable, refer to this link: http://hemant-srivastava.blogspot.com/2013/03/c-code-to-deserialize-bytearray-into.html
anbu johniPosted Feb 12, 2018, 4:04 AM
How to convert bytes[] into datatable in c#
Gowtham RajamanickamPosted Apr 1, 2015, 4:31 AM
nice one,..