partial or full object serialization
问题 Consider the following Student defintion: public class Student { public Guid Id {get; set;} public String FirstName {get; set;} public String LastName { get; set; } } Using C# serialization attributes, how can you apply two different serialization configurations? When the object is passed to the DataContractSerializer , the user could specify "idOnly" (partial) or "full" serialization. I have a two runtime use cases: Only serialize the Guid Full serialization of the Object. 回答1: I don't know