class Transaction {   // Private field holding the time of 
   // the last transaction performed
   private DateTime timeOfLastTransaction;   public void PerformTransaction() {
      // Lock this object
      Monitor.Enter(this);      // Perform the transaction...      // Record time of the most recent transaction
      timeOfLastTransaction = DateTime.Now;      // Unlock this object
      Monitor.Exit(this);
   }   // Public read-only property returning
   // the time of the last transaction
   public DateTime LastTransaction {
      get { 
         // Lock this object
         Monitor.Enter(this);         // Save the time of the last transaction 
         // in a temporary variable
         DateTime dt = timeOfLastTransaction;         // Unlock this object
         Monitor.Exit(this);         // Return the value in the temporary variable
         return(dt);
      }
   }
}
-----------------------------------------------------------------------------------
上面这段代码为什么要使用临时变量 dt ?