.NET Citizenship for DataTable
Cleve pointed out:
I hear tell that in ADO.NET 2.0 the DataTable is now a first class citizen and supports serialization along with other DataSet features.
Correct. In 2.0, the DataTable implements the IXmlSerializable interface and provides the ReadXml/WriteXml methods that could only be emulated in 1.x.
Serializing a DataTable to and from Web service methods is possible now. Now? In 2.0, I mean. In addition, I've seen (but not tested yet) a RemotingFormat property that when set to a nonzero value serializes the DataTable object in a binary (that is, non XML) format. I'm not sure what "binary format" exactly means. Anakrino fails showing the code of the key method and I'm unable to have .NET Reflector even work on 2.0 assemblies. However, binary format is something that explicitly replaces the pure XML serialization format (remains the default) in use so far.