Returning Arrays of Structures

Many times, applications need to return arrays of structured data. Frequently, this data is stored in a database or on a device and needs to be transmitted en masse. For example, when requesting the details of a purchase order, it makes sense to return the lines and delineate the parts of the line. A line item might contain the following details:

  • Part number

  • Part name

  • Part description

  • Quantity ordered

  • Price per part

As we saw with the GetPerson example, a bit of structured data can contain other structures. Likewise, arrays can appear anywhere within the data. Arrays are very powerful and are often quite handy. Fortunately, .NET handles these well too. To keep things simple, we will not introduce any new classes for ...

Get Creating and Consuming Web Services in Visual Basic® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.