What is the recommended way to cast an ICollection<Bar>
to ICollection<IBar>
where Bar
implements IBar
?
Is it as simple as
collection = new List<Bar>();
ICollection<IBar> = collection as ICollection<IBar>?
or is there a better way of doing it?