Παρουσίαση με Ετικέτες

Gotcha: use parentheses around ternary op conditional expressions
25 Αυγούστου 18 03:42 μμ | Μπιρμπίλης Γεώργιος | 0 σχόλια   
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? "a" […]
Δημοσίευση στην κατηγορία: , , , , , , , ,
Gotcha: no prefix increment/decrement VB.net operators, but get parsed
09 Αυγούστου 14 03:39 πμ | Μπιρμπίλης Γεώργιος | 0 σχόλια   
In C/C++ and C# one has useful prefix (++index) and postfix (index++) increment operators and corresponding decrement ones. Although they have a single operant, they’re not working like functions as single + or – prefix would do, but instead they cause side-effects – they edit the variable passed to them. The prefix increment operator first […]
Δημοσίευση στην κατηγορία: , , , , , , , , ,

Search

Go

Ιστορικό Δημοσιεύσεων

Συνδρομές