My C# skills are low, but I can't understand why the following fails:
public interface IQuotable {} public class Order : IQuotable {} public class Proxy { public void GetQuotes(IList<IQuotable> list) { ... } } Then the code is as follows:
List<Order> orders = new List<Orders>(); orders.Add(new Order()); orders.Add(new Order()); Proxy proxy = new Proxy(); proxy.GetQuotes(orders); // produces compile error Am I simply doing something wrong and not seeing it? Since Order implements Quotable, a list of order would go in as IList of quoatables. I have something like in Java and it works, so I'm pretty sure its my lack of C# knowledge.