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

VB gotcha: when If function isn’t equivalent to an If-Then-Else block
25 Νοεμβρίου 11 01:07 μμ | Μπιρμπίλης Γεώργιος | 0 σχόλια   
Just got bitten by the following: Dim takeN As Integer = If(Integer.TryParse(EdTake.Text, takeN), takeN, itemsCount) I had used that instead of writing in 2 lines: Dim takeN As Integer If not Integer.TryParse(EdTake.Text, takeN) then takeN = itemsCount However, there’s an important difference: “If” is a function, so its arguments are evaluated at call-time. The “If” [...]
Δημοσίευση στην κατηγορία: , , , , , , , , , , ,

Search

Go

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

Συνδρομές