clr - Why is C# 4.0's covariance/contravariance limited to parameterized interface and delegate types? -


Is it a limitation of CLR or is there a concern with compatibility with the existing code?

Is it related to the deviation of the confusion of the representatives involved in C # 4.0?

Edit: Is it possible to use a co-contradiction without this limitation running on CLR to be a language?

Simple Answer: This is the CLR limitation.

(I did not see a good, solid explanation anywhere for this ... I do not remember one of Eric's blog series about it, though I do not remember it somewhere. I can remember somewhere.)

One thing I say is that both the representatives and interfaces actually make "layers of indirection" on the actual types; Thinking about the methods or classes, if you do, changing from one scene to another is quite reasonable. The actual class feels like a more solid representation - and seems less appropriate than transferring from one solid representation to another. Although it is a very emotionally-judicious interpretation rather than a real technical limit.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -