|
From: Ioannis V. <no...@ho...> - 2002-07-02 11:39:17
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Santiago Palmier Campos
> Sent: Tuesday, July 02, 2002 1:44 PM
> To: dev...@li...
> Subject: RE: [Dev-C++] C#
>
>
> Hi Mr. Cristian,
>
> I'm not sure if this is the best solution for your 'problem',
> but.. what
> about this code?
>
> switch (x){
> case 3 :
> code3;
> // NO break!!!
> case 1 :
> code_1;
> break;
> case 4 :
> code 4;
> // NO break!!!
> case 2 :
> code_2;
> break ;
> default:
> default_code;
> break;
> }
>
> Just my 2 cents,
> Santy
>
> BTW, using inline functions is at least as good solution as
> this or even
> better, thanx Ioannis for pointing it out!! ;o)
Yes, your solution is the best. I just got confused by all those gotos
even in C# simulation mode. A sign of what will happen to me when i will
start using MS languages. :)
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|