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.
btw, if i were to loop through this array, is it the correct syntax?
foreach (myresult x in res)
{
}
-a
"Jon Skeet [C# MVP]" wrote:
Ace <Ac*@discussions.microsoft.comwrote:
hi there,
i have a following method which returns array of object.
public myresult[] getSearch(string searchterm)
{
object[] res = ....some external method call
return ((myresult[]) (res[0]));
}
so my question is... how do i consume the above method? can i do the
following?
myresult[] res = getSearch("hello");
Yes. Did you try it before posting? What went wrong?
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too