![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br>
|
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | ||
|
Guest
Posts: n/a
|
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 |
||
|
|
|
|
|
|
#2 | ||
|
Just a german hobbyist
![]() Join Date: Jan 2008
Vista Ultimate x64
Posts: 2
Location: Germany
|
Hi!
1) As far as I understand it the classes you expose must be at least serializeable, but the datacontract attribute makes it easy to change the contract later in a compatible way. Alex |
||
|
|
|
|
|
#3 | ||||||||||||||
|
Guest
Posts: n/a
|
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@xxxxxx> wrote in message news:u$6yMYCXIHA.4440@xxxxxx
|
||||||||||||||
|
|||||||||||||||
|
|
|
|