Use of out and in in Generic Interfaces: Covariance and Contravariance
Year: 2025
Type: article
Abstract: This article explores the use of covariance and contravariance in generic interfaces in C#, clarifying the `out` and `in` modifiers. It initially defines the concept of generic interfaces, followed by an analysis of the principles of covariance, which allows the use of derived types, and contravariance, which enables the use of base types.
Author: Sabbag Filho, Nagib
Institution: Faculdade de Informática e Administração Paulista
Language: English
Subfield: Artificial Intelligence
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7076380378
FWCI:
Cites:
Cited by:
Related to:
