For Answers, see/post comments

Serialize a Remotable Dataset

The following code defines the format for the dataset when required for remoting purposes. On serializing the remotable dataset to a binary file, you could see the difference.

FileStream fs = new FileStream(@"c:\authordata.txt", FileMode.Create);
pubsDataSet.RemotingFormat = SerializationFormat.Binary;
// Remove the above line, and serialize the dataset; Check the file content.
BinaryFormatter bfo = new BinaryFormatter();
bfo.Serialize(fs, pubsDataSet);
fs.Close();

No comments: