Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq.Expressions;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication7
  8. {
  9.  
  10. class Program
  11. {
  12. delegate int d(int i);
  13.  
  14. static void Main(string[] args)
  15. {
  16. d obj = x => x + 1;
  17. Console.WriteLine(obj(5));
  18.  
  19. Expression <d> myEx = x => x + 1;
  20. int i = myEx.Compile()(77);
  21. Console.WriteLine(i);
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement