| 6:03 am on Jul 25, 2007 (gmt 0)|
I'm still in the very early learning stages of C# and your question is a little confusing to me. Are you referring to the equivalent of something like the conditional IIf in Visual Basic? Is so I think the proper syntax in C# is:
o = (cond1 = cond2? truevalue : falsevalue);
If I'm wrong I'm sorry. And hopefully I'll learn something in the process. Are you having an easy time learning C#?
| 3:29 am on Jul 26, 2007 (gmt 0)|
Thank you GaryK, I think thats the one i was trying to recall. you saved my brain from a nagging loop!
I love c#, everything aside I find it quite elegant.
PS: so is this kinda IF imported from VB?
[edited by: BlackTulip at 3:30 am (utc) on July 26, 2007]
| 6:06 am on Jul 26, 2007 (gmt 0)|
I'm fluent in many computer languages so learning C# is just a matter of learning the right syntax for stuff, and finding the time to dedicate to learning without being interrupted.
Most languages that I've used have the equivalent of that conditional statement. VBScript being the notable exception.
| 8:39 pm on Jul 26, 2007 (gmt 0)|
This would be the Ternary Operator.
| 8:43 pm on Jul 26, 2007 (gmt 0)|
> PS: so is this kinda IF imported from VB?
That short style IF syntax taken from original K&Rs C - I find C# so much better :)
| 12:46 am on Jul 27, 2007 (gmt 0)|
cool now I know its called a Ternary operation.
this reminds me of my renewed interest to re-study Math, god know how many credits of Math I have forgotten.
| 1:06 pm on Jul 27, 2007 (gmt 0)|
That's ironic BlackTulip... I'm refreshing on Statistics right now. That stuff is 20 years behind me and your right, you do forget it.