Not only can you not do this, but why do you want to?
I'm not sure what types are y and z, but if they have a numeric value type, you can probably use:
var x = Math.Min(y, z);
Although personally, I would prefer:
var x = (y < z) ? y : z;
But am I a little ?: junky.
Good code is not only dense and efficient, but also readable. Even if you are the only one who has ever read this, will you return to this operator <? one day, and wonder what the hell it is.
Paul Hooper Jun 24 '09 at 19:10 2009-06-24 19:10
source share