« April 2003 | Main | August 2003 »

May 18, 2003

XML Serialization Support Reminders

Xml serialization annoyances:

NUnit framework seems to have a problem testing serialization. Complains about StrongNameIdentityPermission? Why?

Things not to forget:

1. public default constructor is required.

2. public fields need to be read/write (don’t forget setters, even if they are no-ops).

3. Public indexers cause serialization to fail with a reflection error. Use [XmlIgnore].

 

May 10, 2003

Serialization, Choosing between XML and Binary formatters.

Ran a test on the performance of serializing data sets using the XML and Binary formats. Serializing a JobQuake data set with 6000+ jobs, 1600 companies, 45 agencies takes about 6 seconds. Deserializing takes about 15-20 seconds. Binary took longer to serialize. Didn’t time binary deserializer. Xml file size was 7.5MB. Binary was 6.3MB.

May 06, 2003

Wrapping DLL Functions, obtaining function names from a DLL.

Consuming Unmanaged DLL Functions

dumpbin –exports user32.dll or link –dump –exports user32.dll to obtain function names