In ASP.net Visual Basic there is code to exit the subroutine:
Exit Sub
What code does the same action in C#?
Exit the subroutine
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Feb 25, 2014, 11:43 AM EST
Jignesh TrivediRank #16 · 50.3K reputationPosted Feb 25, 2014, 6:23 PM EST
hi,
Agree with vulpes.
Return key word used for exit from any function or method.
void MyFunc()
{
if(1 == 1)
{
return;
}
else
{
}
}
hope this will help you.