Exit

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Madhavi

    Exit

    Hi

    in VB i use Exit Property or Exit Sub

    what shud i use in C# for Exit

    Maadhavi

  • Jon Skeet [C# MVP]

    #2
    Re: Exit

    Madhavi <madhoo.vadali@ gmail.comwrote:
    in VB i use Exit Property or Exit Sub
    >
    what shud i use in C# for Exit
    The "return" statement.

    --
    Jon Skeet - <skeet@pobox.co m>
    http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
    If replying to the group, please do not mail me too

    Comment

    • Madhavi

      #3
      Re: Exit

      Thank you it solved my purpose

      maadhavi


      Jon Skeet [ C# MVP ] wrote:
      Madhavi <madhoo.vadali@ gmail.comwrote:
      in VB i use Exit Property or Exit Sub

      what shud i use in C# for Exit
      >
      The "return" statement.
      >
      --
      Jon Skeet - <skeet@pobox.co m>
      http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
      If replying to the group, please do not mail me too

      Comment

      • Ciaran O''Donnell

        #4
        Re: Exit

        You can/should also use return in VB.NET

        Ciaran O'Donnell

        "Madhavi" wrote:
        Thank you it solved my purpose
        >
        maadhavi
        >
        >
        Jon Skeet [ C# MVP ] wrote:
        Madhavi <madhoo.vadali@ gmail.comwrote:
        in VB i use Exit Property or Exit Sub
        >
        what shud i use in C# for Exit
        The "return" statement.

        --
        Jon Skeet - <skeet@pobox.co m>
        http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
        If replying to the group, please do not mail me too
        >
        >

        Comment

        • Morten Wennevik

          #5
          Re: Exit

          Not to mention instead of

          Function MyFunc() As String
          MyFunc = "Something" ;
          End Function

          use

          Function MyFunc() As String
          return "Something" ;
          End Function


          On Fri, 15 Sep 2006 10:56:02 +0200, Ciaran O''Donnell
          <CiaranODonnell @discussions.mi crosoft.comwrot e:
          You can/should also use return in VB.NET
          >
          Ciaran O'Donnell
          >
          "Madhavi" wrote:
          >
          >Thank you it solved my purpose
          >>
          >maadhavi
          >>
          >>
          >Jon Skeet [ C# MVP ] wrote:
          Madhavi <madhoo.vadali@ gmail.comwrote:
          in VB i use Exit Property or Exit Sub
          >
          what shud i use in C# for Exit
          >
          The "return" statement.
          >
          --
          Jon Skeet - <skeet@pobox.co m>
          http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
          If replying to the group, please do not mail me too
          >>
          >>


          --
          Happy Coding!
          Morten Wennevik [C# MVP]

          Comment

          • Jon Davis

            #6
            Re: Exit

            drop your semicolon... you're still in C#land ;)

            Jon

            "Morten Wennevik" <MortenWennevik @hotmail.comwro te in message
            news:op.tfwwqur fklbvpo@tr024.b ouvet.no...
            Not to mention instead of

            Function MyFunc() As String
            MyFunc = "Something" ;
            End Function

            use

            Function MyFunc() As String
            return "Something" ;
            End Function


            On Fri, 15 Sep 2006 10:56:02 +0200, Ciaran O''Donnell
            <CiaranODonnell @discussions.mi crosoft.comwrot e:
            You can/should also use return in VB.NET
            >
            Ciaran O'Donnell
            >
            "Madhavi" wrote:
            >
            >Thank you it solved my purpose
            >>
            >maadhavi
            >>
            >>
            >Jon Skeet [ C# MVP ] wrote:
            Madhavi <madhoo.vadali@ gmail.comwrote:
            in VB i use Exit Property or Exit Sub
            >
            what shud i use in C# for Exit
            >
            The "return" statement.
            >
            --
            Jon Skeet - <skeet@pobox.co m>
            http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
            If replying to the group, please do not mail me too
            >>
            >>


            --
            Happy Coding!
            Morten Wennevik [C# MVP]


            Comment

            • Morten Wennevik

              #7
              Re: Exit

              Dang,

              I wish the VB.Net compiler would ignore those :P



              On Sun, 17 Sep 2006 02:56:32 +0200, Jon Davis
              <jon@REMOVE.ME. PLEASE.jondavis .netwrote:
              drop your semicolon... you're still in C#land ;)
              >
              Jon
              >
              "Morten Wennevik" <MortenWennevik @hotmail.comwro te in message
              news:op.tfwwqur fklbvpo@tr024.b ouvet.no...
              Not to mention instead of
              >
              Function MyFunc() As String
              MyFunc = "Something" ;
              End Function
              >
              use
              >
              Function MyFunc() As String
              return "Something" ;
              End Function
              >
              >
              On Fri, 15 Sep 2006 10:56:02 +0200, Ciaran O''Donnell
              <CiaranODonnell @discussions.mi crosoft.comwrot e:
              >
              >You can/should also use return in VB.NET
              >>
              >Ciaran O'Donnell
              >>
              >"Madhavi" wrote:
              >>
              >>Thank you it solved my purpose
              >>>
              >>maadhavi
              >>>
              >>>
              >>Jon Skeet [ C# MVP ] wrote:
              >Madhavi <madhoo.vadali@ gmail.comwrote:
              >in VB i use Exit Property or Exit Sub
              >>
              >what shud i use in C# for Exit
              >>
              >The "return" statement.
              >>
              >--
              >Jon Skeet - <skeet@pobox.co m>
              >http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
              >If replying to the group, please do not mail me too
              >>>
              >>>
              >
              >
              >


              --
              Happy Coding!
              Morten Wennevik [C# MVP]

              Comment

              Working...