Understanding Covariance and Contravariance in C# 4.0

前端 未结 5 1484
臣服心动
臣服心动 2020-12-02 21:17

I watched a video about it on Channel 9 but I didn\'t really understand it much.

Can someone please give me a simple example about these that\'s easy to understand?

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 21:54

    The following article deals with co- and contravariance with delegates: http://msdn.microsoft.com/en-us/library/ms173174.aspx.

    Perhaps it is useful to you, even if you're not into delegates yet. I found it to be quite easy to understand.

提交回复
热议问题