Leaving a Method from a Class...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kerem Gümrükcü

    Leaving a Method from a Class...

    Hi,

    how can i leave a method inside a class like this method, without
    executing any further code...

    example:

    the method signature is : private void AnyMethod();


    Something like that:

    private void AnyMethod(){

    if(CONDITION){
    //Leave complete method
    }

    }


    Thanks in advance...


    Best Regards


    Kerem Gümrükcü


  • Chris R. Timmons

    #2
    Re: Leaving a Method from a Class...

    "Kerem Gümrükcü" <kareem114@hotm ail.com> wrote in
    news:#paKpFRJFH A.3364@TK2MSFTN GP10.phx.gbl:
    [color=blue]
    > Hi,
    >
    > how can i leave a method inside a class like this method, without
    > executing any further code...
    >
    > example:
    >
    > the method signature is : private void AnyMethod();
    >
    >
    > Something like that:
    >
    > private void AnyMethod(){
    >
    > if(CONDITION){
    > //Leave complete method
    > }
    >
    > }[/color]

    Kerem

    if (CONDITION)
    {
    return;
    }

    --
    Hope this helps.

    Chris.
    -------------
    C.R. Timmons Consulting, Inc.

    Comment

    • Jon Shemitz

      #3
      Re: Leaving a Method from a Class...

      "Kerem Gümrükcü" wrote:
      [color=blue]
      > how can i leave a method inside a class like this method, without
      > executing any further code...[/color]

      return;

      --

      Midnight Beach is Jon Shemitz, a freelance programmer and author. Jon offers software consulting and contract services, and recently finished his 2nd book - .NET 2.0 for Delphi Programmers.

      Comment

      • Kerem Gümrükcü

        #4
        Re: Leaving a Method from a Class...

        Hi,

        oh this is soo painfull, and i am a experienced programmer...yo u wont belive
        that!


        Thanks

        Kerem Gümrükcü


        Comment

        • DalePres

          #5
          Re: Leaving a Method from a Class...

          Sure we believe it. There are days that my mind gets so numb with this
          stuff that I have to look at my driver's license to see what my name is.

          DalePres

          "Kerem Gümrükcü" <kareem114@hotm ail.com> wrote in message
          news:OXjZnvRJFH A.3752@TK2MSFTN GP14.phx.gbl...[color=blue]
          > Hi,
          >
          > oh this is soo painfull, and i am a experienced programmer...yo u wont
          > belive that!
          >
          >
          > Thanks
          >
          > Kerem Gümrükcü
          >[/color]


          Comment

          • MuZZy

            #6
            Re: Leaving a Method from a Class...

            DalePres wrote:[color=blue]
            > Sure we believe it. There are days that my mind gets so numb with this
            > stuff that I have to look at my driver's license to see what my name is.[/color]

            Heh... you copying me! :)
            [color=blue]
            >
            > DalePres
            >
            > "Kerem Gümrükcü" <kareem114@hotm ail.com> wrote in message
            > news:OXjZnvRJFH A.3752@TK2MSFTN GP14.phx.gbl...
            >[color=green]
            >>Hi,
            >>
            >>oh this is soo painfull, and i am a experienced programmer...yo u wont
            >>belive that!
            >>
            >>
            >>Thanks
            >>
            >>Kerem Gümrükcü
            >>[/color]
            >
            >
            >[/color]

            Comment

            Working...