Is there any way to manipulate the program flow in C# from within a function?
I mean in C++ it was possible to place something like
#define Verify(x) if(x==null) return;
or
#define Verify(x) if(x==null) goto _exit;
into a macro and place Verify(x) anywhere into a function. In this example the macro could exit the function if some condition is met. But in C#, you can place the verification into a function, the function might be inlined, but you always have to write something in the form of
if (Verify(x)) return;
. So the question is, is there any way besides exceptions, to manipulate the control flow of a calling function be a called function?