Exemplo n.º 1
0
 public static double SomeHardCoreComputation()
 {
     var data = new TheRealDataStore();
     var result = 1.0;
     for (int i = 0; i < 10; i++)
     {
         var it = data.GetIt(i % 3) + 1;
         result *= it;
     }
     return result;
 }
Exemplo n.º 2
0
        public static void StoringABit(int i)
        {
            var realStorage = new TheRealDataStore();

            if (i%2 == 0)
            {
                realStorage.Store(i);
            }
            else
            {
                realStorage.Store(-i);
            }
        }