code sample on this paragraph would be beneficial?
- Dominant language
- No language data
- Stars
- 4.8k
- Forks
- 6.1k
- Avg merge
- 19h 10m
- Merged PRs (30d)
- 268
Description
Take the following paragraph:
> In general, a covariant type parameter can be used as the return type of a delegate, and contravariant type parameters can be used as parameter types. For an interface, covariant type parameters can be used as the return types of the interface's methods, and contravariant type parameters can be used as the parameter types of the interface's methods.
This is a wall of text. Readers will have to develop a mental model of what it all means. But if supplemented with a code sample, it would be inordinately helpful, and an order of magnitude more descriptive, especially for people who are speaking english as a second language. my two cents.
---
#### Document Details
⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.*
* ID: 74e47b2d-ee75-bd2e-4857-7704af641a2a
* Version Independent ID: 8055442b-8ecf-e869-3e48-a5c4ee5207a1
* Content: [Covariance and Contravariance in Generics](https://learn.microsoft.com/en-us/dotnet/standard/generics/covariance-and-contravariance)
* Content Source: [docs/standard/generics/covariance-and-contravariance.md](https://github.com/dotnet/docs/blob/main/docs/standard/generics/covariance-and-contravariance.md)
* Product: **dotnet-fundamentals**
* GitHub Login: @adegeo
* Microsoft Alias: **adegeo**
Contributor guide
Assessment
This issue has not been assessed yet.