locked
Is there any alternative keyword in c# for Exit Function or Exit Sub in Vb.Net ? RRS feed

  • Question

  • Is there any alternative keyword in c# for Exit Function or Exit Sub in Vb.Net?

    How to exit from a function without ending the program. I am using Exit function in vb.net. But i never find an alternate keyword in c#.

    Please do explain the alternate c# for the following VB.Net keywords ?

    Exit Function

    Exit Sub

    Exit For

    Exit While


    MSDN Forum

    Thursday, January 17, 2013 1:21 AM

Answers

  • return <- Exist Function / Exit Sub

    break <- Exit For / Exit While


    • Edited by cheong00Editor Thursday, January 17, 2013 1:33 AM
    • Proposed as answer by Blackwood Thursday, January 17, 2013 2:00 AM
    • Marked as answer by Amal E S Thursday, January 17, 2013 3:51 AM
    Thursday, January 17, 2013 1:32 AM
    Answerer