Standalone DataRow isn't Serializable

If you look up the DataRow class in the .NET Framework documentation you'll see this:

[Serializable]
public class DataRow

In the happy beleif that this was entirely true I designed my remoting interfaces with DataRow as parameter and return values to transport DataRow objects standalone. But no. I got a SerializationException and Malcolm Stewart with MS Developer support explains why in the adonet newsgroup:

The DataRow has no default constructor and no custom serializable method - either of which
would be required for what you want. In order for a DataRow to be
serialized, it must belong to a DataTable in a DataSet - the DataSet is
currently the smallest unit of data that can be serialized. We are aware of
this limitation and it is due to change in future versions of the product.

Please change this!

2 Comments

Comments have been disabled for this content.