I'm writing an interface and I want to declare a property that returns a generic collection. The elements of the collection should implement an interface. Is this possible and, if so, what is the syntax.
This doesn't compile, what's the right way to do this?
interface IHouse
{
IEnumerable<T> Bedrooms { get; } where T : IRoom
}
Thanks