I have a list of a class I made called MonitoringItem.
public class MonitoringItem
{
public int URLID { get; set; }
public string URL { get; set; }
public List<String> RequestHeaders { get; set; }
public string RegexMatchString { get; set; }
public string CheckType { get; set; }
public string ExpectedResponseCode {get; set;}
}
When I try to consume this on the client side, using a service reference I get:
Error 1 Cannot implicitly convert type 'WebMonitor.GetURLsToMonitor.MonitoringItem[]' to 'System.Collections.Generic.List<WebMonitor.GetURLsToMonitor.MonitoringItem>' \\home\d\Source\Projects\WebMonitor\WebMonitor\WebMonitorProgram.cs 44 17 WebMonitor
This is my client code:
List<GetURLsToMonitor.MonitoringItem> m = new List<GetURLsToMonitor.MonitoringItem>();
GetURLsToMonitor.ws_GetURLsToMonitorSoapClient g = new GetURLsToMonitor.ws_GetURLsToMonitorSoapClient();
m = g.GetURLsToMonitor(); <--This is where it is giving me the error
.
I'm not returning an array so not sure why it's saying this.