https://github.com/kolosovpetro/contravariantlist
Simple snippet to show the use of contravariance in C#.
https://github.com/kolosovpetro/contravariantlist
Last synced: 8 months ago
JSON representation
Simple snippet to show the use of contravariance in C#.
- Host: GitHub
- URL: https://github.com/kolosovpetro/contravariantlist
- Owner: kolosovpetro
- Created: 2020-12-25T23:26:05.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-25T23:27:43.000Z (almost 5 years ago)
- Last Synced: 2025-01-16T06:15:37.258Z (9 months ago)
- Language: C#
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Contravariant List
Simple snippet to show the use of contravariance in C#.
## Example
```cs
IContravariantList list = new ContravariantList();
list.Push(new Wolf());
list.Push(new Wolf());
Console.WriteLine(list.Count);
```