So, I have a C# project in which, I am loading a XML document (contains name of students and Id) using Linq to xml and I have to get the associated data (their due date, amount and stuff ) from a WCF service. I added the service with just right click and add service reference and now need to pass arrays to the GetData function, which I initialized but its null obviously. I cant able to convert my array to service type and the function returns array too. How do I assign the array to studentArray ?
ServiceReference1.ServiceClient client = new ServiceReference1.RycorServiceClient();
Application.ServiceReference1.Student[] studentArray = new ServiceReference1.Student[9];
Student[] array = studentList.ToArray();
//for (int i = 0; i <= array.Count(); i++)
// studentArray[i] = (RycorApplication.ServiceReference1.Student)array[i];
//this gives me an error says Cannot convert type 'Application.Student' to 'Application.ServiceReference1.Student'.
var data = client.GetData(studentArray);
After getting this data, how do I save this data to my XML file ?