Current .Net Version: 2.0.50727
Home
Articles
C# & .Net Framework Reference
Practice C# Online
XML Web Services
RSS Feeds
Code Snippets
T-SQL Scripts
Videos
Valuable Links
Contact Us
Mike's C#, VS.NET and SQL Blog




ROR XML Info.
C# & .Net Framework Reference
Covariance and Contravariance in Delegates (C#)

Full Name:
Covariance and Contravariance in Delegates (C#)

Short Name:
Covariance and Contravariance in Delegates (C#)

Type of Entity:
C#

Abstract:
Covariance and contravariance provide a degree of flexibility when matching delegate methods with delegate signatures. Covariance permits a method with a derived return type to be used as the delegate, and contravariance permits a method with derived parameters to be used as the delegate. This ability enables the creation of more flexible delegate methods, able to cope with more than a specific class or event.

MSDN Source URL:
http://msdn2.microsoft.com/ms173174.aspx

 
COPYRIGHT/DISCLAIMER | CONTACT US