Click here to Skip to main content
15,896,154 members
Articles / Programming Languages / C#

Understanding Covariance and Contravariance in .NET 4.0

Rate me:
Please Sign up or sign in to vote.
5.00/5 (5 votes)
12 Sep 2011CPOL3 min read 40.8K   16  
A covariant type parameter can be used as the return type of a generic delegate/interface, and contravariant type parameters can be used as input parameter types.
No downloads associated with this content

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead Mastek
India India
A Software professional with expertise in developing applications using Microsoft Stack [.Net 2.0/3.0/3.5/4.0] , SQL Server 2005/2008 , Asp.Net [Webforms,MVC] , Entity Framework , WPF , Winforms , Enterprise Library .
Knowledge of Sharepoint [MOSS 2007] and SQL Server BI and still learning ...

Comments and Discussions