Skip to content

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

January 12, 2011

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

From → Others

Leave a Comment

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: