Re: how to deal with a method that returns object array?



Ace <Ace@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
thanks bunch.
in fact, i tried it and it compiled and ran fine. however, the problem is
that res is null after making a call to getSearch() (which is a web service)
and i was not sure if i was doing it wrong or it is just supposed to be null.

Well, to check whether that kind of thing is valid or not, I'd suggest
trying it in a simpler environment first.

btw, if i were to loop through this array, is it the correct syntax?

foreach (myresult x in res)
{
}

Yes.

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.