pszczyg

Untitled

Apr 28th, 2016
659
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         public void Test()
  2.         {
  3.             var numberToBeAdded = 4;
  4.             var listToProcess = new List<int>();
  5.             ProcessList(listToProcess, x=> x + numberToBeAdded);
  6.         }
  7.  
  8.         private void ProcessList(List<int> listToProcess, Func<int,int> processingFunction)
  9.         {
  10.             for (int index = 0; index < listToProcess.Count; index++)
  11.             {
  12.                 var item = listToProcess[index];
  13.                 item = processingFunction(item);
  14.             }
  15.         }
RAW Paste Data