I have a web service with a few web methods. They pass around List<CustomobjectDataType> .
[WebMethod]
public List<CustomobjectDataType> webmethod1()
{
// Do something
return (List<CustomobjectDataType>)object;
}
public void WebMethod2()
List<CustomobjectDataType> obj2 = WebMethod1();
I get a mesmatch saying that the List<> datatype cannot be converted to a
customDataType [] object.
Can anyone let me know how I could cast between or covert between List<> and array[] ?
I know ArrayList has a ToArray() but the List<> generic does not. How do I solve this?