i want to return my Vehicle passed object as a List or array. The code that i currently have is as follows. It highlights “(List)passed” and the error states
Cannot convert type 'HelloWorldNew.Vehicle' to System.Collections.Generic.List<HelloWorldNew.Vehicle>'
[WebMethod]
public List<Vehicle> GetCustomerList(Vehicle passed)
{
List<Vehicle> newL = (List<Vehicle>)passed;
return newL;
}
It would be great if the above code sample can be amended so that i can return the vehicle object as a list.
Any help would be greatly appreciated. Thanks
is what you want