标签: asp.net design-patterns xml-serialization
XML序列化使用的PropertySpecified模式的目的是什么? 它试图解决什么问题?
答案 0 :(得分:2)
它试图解决int float等不能为空的问题,因此没有其他方法来表明XML文件中是否存在属性/元素。
int
float
它实际上只在.NET 1.x中有用,因为在.NET 2中,您只能使用Nullable<T>(例如int?)。
Nullable<T>
int?