Double-checking
От: Аноним  
Дата: 13.06.13 09:42
Оценка:
Привет
поясните

здесьjetbrains пишут


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;


а почему в данному случае очередность операций гарантируется? потому что очередность не гарантируется только над одним объектом?
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.