Covariance and Contra-variance with delegates in C# (via deepssharma)

Covariance and Contra-variance seems to be scary terms for a very simple and familiar concept.  C# 4.0 introduces the notion of Covariance and Contra-variance of generic type parameters for interfaces and delegate types.  For delegate types: Covariance and contra-variance provide a degree of flexibility when matching method signatures. Covariance permits a method to have a more derived return type than what is defined in the delegate. Following e … Read More

via deepssharma

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s