|
Παρουσίαση με Ετικέτες
Όλες οι Ετικέτε... » Programming » Gotcha » Ternary (RSS)
-
Just came across the following case in C# that puzzled me momentarily, especially since the strings involved were long enough and the expression was broken on multiple lines: bool flag = true; string test1 = flag? "xa" : "xb"; string test2 = "x" + (flag? "a" : "b"); string test3 = "x" + flag? ...
|
|
|