Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Star
13877 Points
2598 Posts
Mar 13, 2012 01:39 PM|LINK
In your if statement try to use return; Return will exit the method at that point without running any more code.
bool isTrue = false; if (1 == 1) { if (2+1 == 3) { isTrue = true; } return; } else { isTrue = false; }
b471code3
Star
13877 Points
2598 Posts
Re: How to Return before execution?
Mar 13, 2012 01:39 PM|LINK
In your if statement try to use return; Return will exit the method at that point without running any more code.
bool isTrue = false; if (1 == 1) { if (2+1 == 3) { isTrue = true; } return; } else { isTrue = false; }