Calling a method like
DoSomething();
causes it to start executing whatever is inside. In some point, if you no longer wish to continue in execution of that method call, use return
statement with no return value for methods returning void or return something
for methods with non-void return type, where something
is type of the return type.
public void DoSomething()
{
... do something
if (condition)
return; // returns from a method call
}