I have an error in the following implementation. It says that OnlineWebStore_Process cannot implement the interface IWebStore because they don't have a matching return type. But the method returns Item which implements the IItem interface used as return type in the IWebStore interface. What's a good solution to this problem?
public interface IItem
{
string id { get; set; }
string name { get; set; }
}
public interface IWebStore
{
List<IItem> GetOnlineItems();
}
public class Item : IItem
{
public Item(string _id)
{
id = _id;
}
public string id { get; set; }
public string name { get; set; }
}
public class OnlineWebStore_Process : IWebStore
{
public List<Item> GetOnlineItems()
{
List<Item> items = new List<Item>();
return items
}
}