O'Reilly logo

Pro Silverlight 5 in VB by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required