Tuesday December 1st

Monday November 30th

1 Kicks

How to serialize SubSonic objects with nullable properties

Recently, I ran into the following error when trying to serialize some SubSonic generated classes. "Cannot serialize member ‘XXX’ of type System.Nullable`1[XXX]. XmlAttribute/XmlText cannot be used to encode complex types." The SubSonic autogenerated classes cannot serialize nullable types such as DateTime? and GUID?. This is really a .NET serialization problem and not directly related to SubSonic, since the SubSonic library just uses the native .NET code for serialization. I'll describe 3 (or 4) different ways of getting around this problem.


Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network