[Mono-list] Helo in switch-case:

Gaurav Vaish gvaish@iitk.ac.in
Sat, 16 Mar 2002 13:57:16 +0530


----- Original Message -----
From: "John Barnette" <jbarn@httcb.net>
To: "Gaurav Vaish" <gvaish@iitk.ac.in>; <mono-list@ximian.com>
Sent: Saturday, March 16, 2002 12:59
Subject: Re: [Mono-list] Helo in switch-case:


: Gaurav,
:
: Even default: labels must have a break in C#, I believe.

    On the contrast, my "break" statements are redundant. C# does not believe in
"break" - it does it by default. This is in exactly opposite direction with what
we have in other languages (C/C++/Java) where the flow is automatically
transferred to next label if no break if found.

    In C#, whether or not break is there, the control is transferred to the end
of the block. So, applying break to default may not help.

    Hey wait.. I just tried out, it's surprising (and also disgusting) to see
this. Applying "break" worked.

    Miguel - what implementation do we have in our mcs for this? This is going
to be a critical point -- applying a "break" even after the last option, I mean,
making it a total must. I hate that.



Cheers,
Gaurav Vaish
http://home.iitk.ac.in/student/gvaish
http://calendar.yahoo.com/mastergaurav
---------------------------------


:
:
: ~ j.
:
:
: _______________________________________________
: Mono-list maillist  -  Mono-list@ximian.com
: http://lists.ximian.com/mailman/listinfo/mono-list