PolySharp provides generated, source-only polyfills for C# language features, to easily use all runtime-agnostic features downlevel. Add a reference, set your C# version to latest and have fun! 🚀
This exception is not really intended to be caught as it being thrown indicates that something has gone horribly wrong, like a Debug.Assert() failing or Environment.FailFast() being called.
I have several code paths in some of my analyzer and source generator projects where throwing UnreachableException is the obvious thing to do, but the type is net7.0 only.
This exception is not really intended to be caught as it being thrown indicates that something has gone horribly wrong, like a
Debug.Assert()
failing orEnvironment.FailFast()
being called.I have several code paths in some of my analyzer and source generator projects where throwing
UnreachableException
is the obvious thing to do, but the type isnet7.0
only.