Some times in C# I would like to throw an exception that cannot be handled. An escalated exception that results in the process being stopped. Is this possible?
You could do something like:
class BadassException : Exception
{
public BadassException(string message)
{
Environment.FailFast(message);
}
}
...
throw new BadassException("Erk!!!");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With