Guest User

Untitled

a guest
May 27th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. var query = new[] {1, 2, 3, 4, 5, 6, 7}.Select(i => {
  2. dynamic expando = new ExpandoObject();
  3. expando.i = i;
  4. expando.root = () => i * i;
  5. return expando
  6. });
  7.  
  8. foreach(dynamic item in query){
  9. Console.WriteLine(item.root());
  10. }
Add Comment
Please, Sign In to add comment