Esempio n. 1
0
 public double CalSquare()
 {
     if (cache.ContainsKey(side))
     {
         Console.WriteLine("-- Get value from cache --");
     }
     else
     {
         cache.Add(side, real.CalSquare());
     }
     return(cache[side]);
 }