Covariance and contravariance (computer science): Difference between revisions

Content deleted Content added
Line 87:
</syntaxhighlight>
 
Alternatively, to enforce that a C# method accesses a collection in a read-only way, one can use the interface {{C sharp|IEnumerable<object>}} instead of passing it an array {{C sharp|object[]}}.
 
== Function types ==