Record types are one of my most highly anticipated features having used them in Kotlin (where they are known as data classes). Cutting out the Equals/GetHashCode boilerplate will be extremely useful.
The switch expression from C# 8 has been one of my most used new features since updating, the only disadvantage is that when you have multiple branches that should have the same resulting value you have to provide each branch separately rather than batching them together. Ideally I’d like to write something like:
Another handy recent addition from C# 8 are indices and ranges: docs.microsoft.com/en-us/dotnet/cs... - I’ve found these especially useful when working with the Span<T> types!
Record types are one of my most highly anticipated features having used them in Kotlin (where they are known as data classes). Cutting out the Equals/GetHashCode boilerplate will be extremely useful.
The switch expression from C# 8 has been one of my most used new features since updating, the only disadvantage is that when you have multiple branches that should have the same resulting value you have to provide each branch separately rather than batching them together. Ideally I’d like to write something like:
Another handy recent addition from C# 8 are indices and ranges: docs.microsoft.com/en-us/dotnet/cs... - I’ve found these especially useful when working with the
Span<T>
types!about your switch there I believe if you just write it like so (1,2,3) => "result", you can achieve what you want.. Thanks for sharing Euan