IService1.cs
[OperationContract]
string SendMessage(string[] contact, string message,CookieContainer con);
Service1.svc.cs
string SendMessage(string[] contact, string message,CookieContainer con);
{
.... .....
....
... code
}
Client Side
string[] contact;
svc.SendMessageCompleted += new EventHandler<SendMessageCompletedEventArgs>(svc_Send_Sms);
svc.SendMessageAsync(contact, txtsms.Text,con);
this gives error
The best overloaded method match for ‘SmsApplication.ServiceReference1.Service1Client.SendMessageAsync(System.Collections.ObjectModel.ObservableCollection, string, System.Net.CookieContainer)’ has some invalid arguments
Argument 1: cannot convert from ‘string[]’ to ‘System.Collections.ObjectModel.ObservableCollection’
I believe this solution should work.
Right click on the service reference
Choose the configure service reference option
Under the Data Type section change the Collection type from Array to the type you want in the drop down menu.