Loading...
DotNetKicks.com
.NET links, community driven
login
register
submit a story
upcoming stories
about
blog
Why not
join our community?
, there are
7 users online
home
users
activa
comments
DotNetKick.com is an
open-source project
. Please
report any bugs
and let us know
your great suggestions
.
Currently running svn revision
620
(rss)
Kick Spy!
,
Kick Zeitgeist
and
Kick Widgets
activa
activa
Profile
Kicked
Submitted
Comments
Tags
Friends
Kicked By Friends
Submitted By Friends
Comments:
if ... else if ... else if ... else ... : an alternative
You people are hilarious.
What a fuss over a stupid article about a simple language feature that few people know about. The code sample I gave is not complicated, and cleaner than the if-then-else way of writing it, *IN THIS SPECIFIC CASE*. And in this case, even if someone doesn't have a clue about what the ternary operator does, he/she will still capture the meaning of that piece of code, because of the way it is written.
I would never recommend this pattern for performing complex conditional assignments. It's just a piece of code showing the "special" behavior of a right-associative operator such as the ternary operator.
posted by
activa
8 months, 17 days ago
Write more empty lines! They will be read!
You're lucky I don't have to do your code reviews :D
posted by
activa
8 months, 27 days ago
« Previous
1
Next »
Sponsored Link:
www.carlist.ie
Search:
Ads via The Lounge
DotNetKicks is an open source project from
Incremental Systems