阅读背景:

如何在使用DataContractSerializer进行序列化时忽略某个属性?

来源:互联网 

I am using .NET 3.5SP1 and DataContractSerializer to serialize a class. In SP1, they changed the behavior so that you don't have to include DataContract/DataMember attributes on the class and it will just serialize the entire thing. This is the behavior I am using, but now I need to ignore one property from the serializer. I know that one way to do this is to add the DataContract attribute to the class, and just put the DataMember attribute on all of the members that I want to include. I have reasons, though, that this will not work for me. I am using .NET 3.5SP1 and DataContractSerializ




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: