Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var query = new[] {1, 2, 3, 4, 5, 6, 7}.Select(i => {
- dynamic expando = new ExpandoObject();
- expando.i = i;
- expando.root = () => i * i;
- return expando
- });
- foreach(dynamic item in query){
- Console.WriteLine(item.root());
- }
Add Comment
Please, Sign In to add comment