using System;//любой метод может выбросить ошибкуvoid MethodWithException() { throw new Exception("test exception");}