Hi Wal, What version of the framework are you using. In .NET 4, both work fine.
Regards, Michael M. Minutillo Indiscriminate Information Sponge Blog: http://wolfbyte-net.blogspot.com On Thu, Aug 12, 2010 at 4:31 PM, Wallace Turner <[email protected]> wrote: > Hi, > > Assume the class definitions > > interface IOrder { } > > class Order : IOrder { } > > > > I understand why this doesn't compile: > > > > var list = new List<Order>(); > > IEnumerable<IOrder> iOrders = list; //IEnumerable<IOrder> not same type as > List<Order>! > > > > So using that logic, can't understand why this *does* compile: > > > > var arr = new Order[0]; > > IEnumerable<IOrder> iOrders = arr; //IEnumerable<IOrder> assignable from > Order[] ? > > > > Cheers, > > > > Wal >
