2 ms·
There's also the OneOf NuGet package [1] which I've put to good use in a number of projects. Using `object` and `is` means you can't enforce what types get pass
by coldacid 9y ago
There's also the OneOf NuGet package [1] which I've put to good use in a number of projects. Using `object` and `is` means you can't enforce what types get passed in, nor can you ensure that all possible types actually get handled.
[1]: https://github.com/mcintyre321/OneOf/ https://github.com/mcintyre321/OneOf/
- naasking 9y agoI can never justify the use of delegates for pattern matching purposes. It's just way too much overhead, and so would discourage the use of these abstractions.