hello
how can i break out of an if statement?
exit only works for "for", "sub" ,...
thanks in advance
hello
how can i break out of an if statement?
exit only works for "for", "sub" ,...
thanks in advance
There isn't such an equivalent but you should't really need to with an If statement. You might want to look into using Select Case (VB) or Switch (C#) statements.
In VB.net:
if i > 0 then
do stuff here!
end if
In C#:
if (i > 0)
{
do stuff here!
}
You can't 'break out' of an if statement. If you are attempting this, your logic is wrong and you are approaching it from the wrong angle.
An example of what you are trying to achieve would help clarify, but I suspect you are structuring it incorrectly.