C#9 Demo App
This is a C#8 project. However, there are a few places where upgrading to C#9 can make things a lot clearer and more concise using the new features of the language.
New features are here.
Here's a checklist of stuff I put around to be used to upgrade the app:
- Records
- Init only setters
- Top-level statements
- Pattern matching enhancements (admittedly I could've gotten more creative with this one)
- Target-typed new expressions
- Static anonymous functions
- Covariant return types
- Extension GetEnumerator support for foreach loops
- Lambda discard parameters
Here's stuff I didn't put in and why
- Native sized integers <- This is for low level optimization
- Function pointers <- This is only for unsafe code
- Suppress emitting localsinit flag <- This is for low level optimization
- Target-typed conditional expressions <- This is nuance for optimization
- Attributes on local functions <- Would be too convoluted to shoehorn into this app
- Module initializers <- Would be too convoluted to shoehorn into this app
- New features for partial methods <- This is for generated code