Hi I have been told that it is possible to call an ArrayList Method in a WebService from a console App.

[Method] " public ArrayList AuthenticateUsers(string username, string password,
string IncomingIP, decimal Pin) "

[call]

Service1 serv = new Service1();
ArrayList ar = serv.AuthenticateUsers("test", "12345","192.168.0.5", 29);

Error Cannot implicitly convert type 'Object[] to System.Collections.ArrayList'

how can i solve this?

-G

Recommended Answers

That because the method not return an ArrayList.
or
WebService convert the output in an array of objects (Object[])
In this case use AddRange() method to add the array to ArrayList.

Jump to Post

All 2 Replies

That because the method not return an ArrayList.
or
WebService convert the output in an array of objects (Object[])
In this case use AddRange() method to add the array to ArrayList.

please we want the function of Array sort list code c#

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.