public byte[] DS_Serialize(DataSet ds) { try { byte[] binaryDataResult = null; using (MemoryStream memStream = new MemoryStream()) { BinaryFormatter brFormatter = new BinaryFormatter(); ds.RemotingFormat = SerializationFormat.Binary; brFormatter.Serialize(memStream, ds); binaryDataResult = memStream.ToArray(); } return binaryDataResult; } catch (Exception er) { return null; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)