[Mono-list] Conditionals in C#

Linus Upson linus@linus.com
Sat, 6 Apr 2002 11:36:07 -0800


Your conditional statement compiles and executes as expected using
MSFT's csc.

Linus


-----Original Message-----
From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com] On
Behalf Of Daniel Carrera
Sent: Saturday, April 06, 2002 11:13 AM
To: Mono
Subject: [Mono-list] Conditionals in C#


Is it possible to write the following conditional in C#?

string var = (3 > 2 ? "ok" : "no" );


It doesn't compile under mcs, but it might just not be implemented.
Is there some sort of equivalent?

I've been loking all over the on-line tutorials and I haven't found any
reference to this.

Thanks,
Daniel.


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