pszczyg

Untitled

Apr 29th, 2016
648
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         public void Test()
  2.         {
  3.             var displayClass = new DisplayClass();
  4.             displayClass.numberToAdd = 1;
  5.             displayClass.numberToSubstract = 2;
  6.  
  7.             var listToProcess =new List<int>();
  8.             ProcessList(listToProcess, displayClass.addition, displayClass.substraction);
  9.         }
  10.  
  11.         private sealed class DisplayClass
  12.         {
  13.             public int numberToAdd;
  14.             public int numberToSubstract;
  15.            
  16.             public int addition(int x)
  17.             {
  18.                 return x + numberToAdd;
  19.             }
  20.  
  21.             public int substraction(int x)
  22.             {
  23.                 return x - numberToSubstract;
  24.             }
  25.         }
RAW Paste Data