От: | Аноним | ||
Дата: | 13.06.13 09:42 | ||
Оценка: |
The second is to perform the initialization in a non-checked variable and then assigned it to the checked one, thus eliminating the ordering problem. Thus, the code in the inner if statement from the above example could be re-written as:
var temp = new Foo();
temp.Init();
instance = temp;