By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,456 Members | 1,372 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,456 IT Pros & Developers. It's quick & easy.

Leaving a Method from a Class...

P: n/a
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ü
Nov 16 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"Kerem Gümrükcü" <ka*******@hotmail.com> wrote in
news:#p**************@TK2MSFTNGP10.phx.gbl:
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
}

}


Kerem

if (CONDITION)
{
return;
}

--
Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Nov 16 '05 #2

P: n/a
"Kerem Gümrükcü" wrote:
how can i leave a method inside a class like this method, without
executing any further code...


return;

--

www.midnightbeach.com
Nov 16 '05 #3

P: n/a
Hi,

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

Kerem Gümrükcü
Nov 16 '05 #4

P: n/a
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ü" <ka*******@hotmail.com> wrote in message
news:OX**************@TK2MSFTNGP14.phx.gbl...
Hi,

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

Kerem Gümrükcü

Nov 16 '05 #5

P: n/a
DalePres wrote:
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.
Heh... you copying me! :)

DalePres

"Kerem Gümrükcü" <ka*******@hotmail.com> wrote in message
news:OX**************@TK2MSFTNGP14.phx.gbl...
Hi,

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

Kerem Gümrükcü



Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.