G
Guest
I have a DataRow that I need to send it to another process as a XML string by
remoting.
Bu I do not want the other process to be familiar with the schema or
DataTable and DataRow structure, so I tried to serialize it to a XML string
but I get an exception saying the DataRow as no public data.
The code I tried to use
XmlWriter writer = new XmlTextWriter(new System.IO.StringWriter());
// Throw an exception !
XmlSerializer serializer = new XmlSerializer(typeof(DataRow));
serializer.Serialize(writer, myDataRow);
string xmlStr = writer.ToString();
writer.Close();
Is there a way to convert a DataRow to an XML string ?
remoting.
Bu I do not want the other process to be familiar with the schema or
DataTable and DataRow structure, so I tried to serialize it to a XML string
but I get an exception saying the DataRow as no public data.
The code I tried to use
XmlWriter writer = new XmlTextWriter(new System.IO.StringWriter());
// Throw an exception !
XmlSerializer serializer = new XmlSerializer(typeof(DataRow));
serializer.Serialize(writer, myDataRow);
string xmlStr = writer.ToString();
writer.Close();
Is there a way to convert a DataRow to an XML string ?