tags:

views:

125

answers:

2

In chapter eight (p189) of "CLR Via C#", Jeffrey Richter states that:

"A Type constructor can be applied to interfaces (although C# doesn't allow this)"

I've done a little bit of research and I can't seem to find why an interface would ever need a type constructor, in any language. This seems like something that you would explicitly disallow in the CLR.

When would this ever be needed, and why is it possible?

+2  A: 

You may be interested in reading this question and some of its answers on SO.

It basically covers how the C# compiler instantiates COM objects based on interfaces. It's not necessarily the same situation that Richter discusses, but its an interesting case of instantiating interfaces.

LBushkin
A: 

Think of it in situations where you want to treat the interface as an abstract class. Although C# doesn't support that.

mfawzymkh