Link to home
Start Free TrialLog in
Avatar of g-spot
g-spot

asked on

Creating a webservice in ASP.net that accepts an array

Im trying to create a method for a web service that accepts an array parameter. However I get the following error when trying to run the web service:

You must implement a default accessor on System.Array because it inherits from ICollection.

My code so far is:

Public Class TravelQuote
    Inherits System.Web.Services.WebService

    Private _superPrice As Decimal = 0

    <WebMethod()> _
    Public Function GetQuote(ByVal product As String, ByVal destination As String, ByVal grouptype As String, ByVal duration As String, ByVal ages As Array) As String

        Return 0

    End Function

How do I fix the service to allow the passing of an array?
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of g-spot
g-spot

ASKER

Thank you Bob!!