예제 #1
0
 public void Update(StockSubject sub)
 {
     foreach (var port in portfolios)
     {
         foreach (Stock stonk in port.StockList)
         {
             Console.WriteLine($"{stonk.Name}: {stonk.Value}");
         }
     }
 }
예제 #2
0
 public void Update(StockSubject su)
 {
     CalculateTotalValue();
     Console.WriteLine("Current portfolio value: " + TotalValue);
 }