rmmarsh
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?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ignore my last post... I found the problem...
ASKER
Thanks...
ASKER
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?