SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     internal class IntRefLambda{
  2.         #region Delegates
  3.  
  4.         public delegate int IntLambdaDelegate(int input);
  5.  
  6.         #endregion
  7.  
  8.         readonly IntRef _reference;
  9.         readonly IntLambdaDelegate _function;
  10.  
  11.         public IntRefLambda(IntRef reference, IntLambdaDelegate functionToApply){
  12.             _reference = reference;    
  13.             _function = functionToApply;
  14.         }
  15.  
  16.         public int Value{
  17.             get { return _function.Invoke(_reference.Value); }
  18.         }
  19.     }
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top