Wcf, serialization, readonly member.
I am learning WCF and one of the challanges I am faced with today is to implement this design:

     [DataContract]
     public class MyOwnFaultException : FaultException<MyResult> {
  
          public MyOwnFaultException(MyResult result) : base(result) {}
     }
      

     [DataContract]
    public class MyResult 
    {
        readonly DefinedResults dres;

        public MyResult(DefinedResults res) {
            dres = res;
        }

        [DataMember]
        public DefinedResults DRes 
        {
            get { return this.dres; }
            //do not want to have the setter for this, but w.o it .net throws exception

    
        }

       

    }

    [DataContract]
    public enum DefinedResults 
    { 
        Success = 0,
        Fail = 1,
    }



<b> Service </b>


        

        [OperationContract]
        [FaultContract(typeof(MyOwnFaultException))]
        void TestRemoteException();

   


So, naturally when I try to create a reference to my 'faulty' service I get the "No Set For DRes member" exception which is understood. But how to I implement the readonly field pattern to the value object used for result indicator?
Wcf, serialization, readonly member.
===

I am learning WCF and one of the challanges I am faced with today is to implement this design:

     [DataContract]
     public class MyOwnFaultException : FaultException<MyResult> {
  
          public MyOwnFaultException(MyResult result) : base(result) {}
     }
      

     [DataContract]
    public class MyResult 
    {
        readonly DefinedResults dres;

        public MyResult(DefinedResults res) {
            dres = res;
        }

        [DataMember]
        public DefinedResults DRes 
        {
            get { return this.dres; }
            //do not want to have the setter for this, but w.o it .net throws exception

    
        }

       

    }

    [DataContract]
    public enum DefinedResults 
    { 
        Success = 0,
        Fail = 1,
    }



<b> Service </b>


        

        [OperationContract]
        [FaultContract(typeof(MyOwnFaultException))]
        void TestRemoteException();

   


So, naturally when I try to create a reference to my 'faulty' service I get the "No Set For DRes member" exception which is understood. But how to I implement the readonly field pattern to the value object used for result indicator?