| Subject: Questions on DataContract |
| Group: microsoft.public.windows.developer.winfx.indigo |
| Date: 1/21/2008 5:06:25 AM |
| From: Peter K [Email Address Protection] |
Hi - a couple of basic questions: (1) if I have a custom class as a parameter to an OperationContract method, does that class need to be a DataContract class? (2) do the DataMembers of a DataContract always have to have a "get" and a "set"? Thanks, Peter |
| Back |
| Subject: Re: Questions on DataContract |
| Group: microsoft.public.windows.developer.winfx.indigo |
| Date: 1/22/2008 8:20:31 AM |
| From: "Cezary Nolewajka" [Email Address Protection] |
1) Custom defined types must have the DataContract attribute. Alternatively, if you can use MessageContracts. 2) No. They can even be private, protected, or public members but without having equivalent property declarations. -- Best regards, Cezary Nolewajka Consultant | Microsoft Services | Microsoft | Poland "Peter K" <xdzgor@hotmail.com> wrote in message news:u$6yMYCXIHA.4440@TK2MSFTNGP06.phx.gbl... > Hi - a couple of basic questions: > > (1) > if I have a custom class as a parameter to an OperationContract method, > does that class need to be a DataContract class? > > (2) > do the DataMembers of a DataContract always have to have a "get" and a > "set"? > > > Thanks, > Peter |
| Back |