Can a method do a return on the calling method?
void Main()
{
Returner(); //how can i return here...
DoNotCallDueToReturn();
}
void Returner()
{
return //... from here?
}
DoNotCallDueToReturn()
{
Console.WriteLine("You failed to return");
}
Your second method would have to return a value:
int Main()
{
return Returner();
}
int Returner()
{
return something;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With