Datacontract exception. Cannot be serialized

前端 未结 6 878
天命终不由人
天命终不由人 2021-01-01 08:28

I have the following WCF DataContract:

[DataContract]
public class Occupant
{
    private string _Name;
    private string _Email;
    private string _Organi         


        
6条回答
  •  隐瞒了意图╮
    2021-01-01 09:07

    My guess would be because _Email is not initialized. You could set EmitDefaultValue to false and see if that helps:

    [DataMember(EmitDefaultValue = false)]
    public string Email
    {
    

提交回复
热议问题