[Mono-list] WebMethod with List argument
Chris Howie
cdhowie at gmail.com
Wed Nov 26 16:20:50 EST 2008
On Wed, Nov 26, 2008 at 11:05 AM, Ruediger Berlich
<ruediger.berlich at googlemail.com> wrote:
> Hi there,
> I'm playing with Mono's (2.0) web service implementation.
>
> The Web method looks similar to:
>
> public void sortFruit(ref List<Fruit> fruitCollection){
> fruitCollection.Sort();
> }
>
> The **auto-generated** client proxy, however, has the signature
>
> public void sortFruit(ref Fruit[] fruitCollection) {
> // ...
> }
>
> Compilation then fails, as there is no automatic conversion between
> List<Fruit> and Fruit[] .
>
> Is this a C# / Mono restriction or am I doing something wrong ?
I'm not sure, but you could instead use IList<Fruit> since Fruit[] and
List<Fruit> both implement this interface.
--
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers
More information about the Mono-list
mailing list