Web Service Data Types
When you create a web service for use with Silverlight, you're limited to the core set of .NET data types. This includes strings, Boolean values, bytes, numeric data types, enumeration values, and DateTime objects. You can also use arrays, collections of any supported type, and—more interestingly—custom classes that are build with these same data types.
Custom Data Classes
To build a custom class that works with a web service, you need to meet a few basic requirements:
- Your class declaration must be decorated with the DataContract attribute.
- Your class must consist of public, writeable properties. Each property must use one of the previously discussed serializable data types, or another custom class.
- Each property must ...