You say that the value ticketPriceremains zero, but the code does not show the place where you read the value of the variable!
, , , . :.
double ticketPrice;
LoadOperation loGetTickets = ticketClass.loadTickets();
loGetTickets.Completed += (s, args) => {
ticketPrice = ...
};
Console.WriteLine(ticketPrice);
, , (*), , Completed. , , , ( , ).
, , , -, - :
LoadOperation loGetTickets = ticketClass.loadTickets();
loGetTickets.Completed += (s, args) => {
double ticketPrice;
ticketPrice = ...
Console.WriteLine(ticketPrice);
};
, # 4:-). F # ( witout ) # # .