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

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" […]
Δημοσίευση στην κατηγορία: , , , , , , , ,
Suggestion: Introduce .= operator for C#
11 Νοεμβρίου 15 05:45 μμ | Μπιρμπίλης Γεώργιος | 0 σχόλια   
It would be nice if one could write in C# (and maybe in other .NET languages too): s = s.SomeMethodOfS(…)… as s .= SomeMethodOfS(…)… that is to have a .= operator, similar to += and other shorthand experession operators see screenshot for an example usecase from the opensource project FoscamController     Ideally, usage of […]
Δημοσίευση στην κατηγορία: , , , , , ,
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

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

Συνδρομές