Java RuntimeException equivalent in C#?

SystemException is the equivalent, it is the base class of all exceptions that can be raised by .NET code. As opposed to application exceptions.

From the comments it however sounds like you want to catch this exception. In which case you should never use SystemException, you'll catch too many. Make your own exception class, derived from Exception.

There are no exception specifications in .NET, in case that's what you're after.


In .NET, the program flow will fail if an unhandled exception occurs; a windows app will give up, and an ASP.NET application will bubble all the way to the Global.asax' Application_Error handler.

In that respect, no. However, perhaps you can include an example of what you're trying to do, and we can provide suggestions on patterns or approaches to get you a solution.