Sodium Hydroxide
Sodium Hydroxide

Reputation: 147

Serializing fields in a custom DataSet to XML

Is there any way to add fields to a DataSet which will be serialized along with the table information when the DataSet is serialized in XML? I have some information that describes the DataSet that I want to try to include inside it when I throw it around in XML. I've tried adding fields and classes in the partial class Visual Studio generates for you for validation methods but I can't seem to get them to show up alongside the table information in the XML file either when myDataSet.WriteXML() or I use an XMLSerializer.

Upvotes: 1

Views: 1222

Answers (1)

Matt Hamilton
Matt Hamilton

Reputation: 204269

I haven't ever tried it, but the ExtendedProperties property of DataSet is supposed to be just for this. It lets you store information which is persisted when the DataSet is serialised to XML.

Upvotes: 2

Related Questions