W
Wild Wind
Hello,
I have an object which has various properties, including one which is
of type DataSet.
I need to serialize this object in binary format, but I've discovered
that the BinaryFormatter will only format datasets in XML format.
I've read various articles on how to address the problem, including
the KB829740 article which talks about using a DataSetSurrogate
class.
I'm not quite sure how this class would work in my
circumstance, because the sample it gives deals with the simple
case of just serializing a dataset, rather than serializing an
object that has a dataset.
Should I have a new property of type DataSetSurrogate in my object
and pass the DataSet object in my class to this DataSetSurrogate's
constructor? If so, how do I stop the existing DataSet from being
serialized?
Presumably, when I deserialise my object, I should use the
ConvertToDataSet method of the DataSetSurrogate property that
I get back to produce the original DataSet, right?
I would appreciate any answers/clarification I get on this subject.
I have an object which has various properties, including one which is
of type DataSet.
I need to serialize this object in binary format, but I've discovered
that the BinaryFormatter will only format datasets in XML format.
I've read various articles on how to address the problem, including
the KB829740 article which talks about using a DataSetSurrogate
class.
I'm not quite sure how this class would work in my
circumstance, because the sample it gives deals with the simple
case of just serializing a dataset, rather than serializing an
object that has a dataset.
Should I have a new property of type DataSetSurrogate in my object
and pass the DataSet object in my class to this DataSetSurrogate's
constructor? If so, how do I stop the existing DataSet from being
serialized?
Presumably, when I deserialise my object, I should use the
ConvertToDataSet method of the DataSetSurrogate property that
I get back to produce the original DataSet, right?
I would appreciate any answers/clarification I get on this subject.