Monday, June 28, 2004
Tip serialize dataset
How can
I serialize a DataSet object?It's a very good question. DataSet object can be serialized two
different ways. First of all, you can use XmlSerializer, create a serializer
type of DataSet, and then call the Serialize method, as we did in all the
slides, and basically it will serialize the DataSet object. However, DataSet has
its own serializing method developed. Data sets use XmlSerializer class
internally and it has its own methods available. They are called WriteXml
and WriteXmlSchema. So you could use those methods or you could use
XmlSerializer to serialize the dataset.