Link to home
Start Free TrialLog in
Avatar of rmmarsh
rmmarshFlag for United States of America

asked on

How to return a 'struct' from a web service

I have a need to return a struct from my web service to the calling C# Windows app... how do I do this?  The struct looks like this:

    private struct isbnAndPrices
    {
        string isbn;
        decimal[] prices;
    }
    isbnAndPrices retValue;


What should the return statement look like?  Also, when defining the public method, how do I indicate the return type is a struct?
ASKER CERTIFIED SOLUTION
Avatar of andrewjmears
andrewjmears

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 rmmarsh

ASKER

I really need the structore to be an array of the structure:

    private struct isbnAndPrices
    {
        public string isbn;
        public decimal high, low, average;
    }
    isbnAndPrices[] retValue;

However, when I try to access the member "isbn", it is not visible... Why?  Can I still return an array of this struct?
Avatar of rmmarsh

ASKER

Ignore my last post... I found the problem...
Avatar of rmmarsh

ASKER

Thanks...