Created
November 23, 2012 09:48
-
-
Save fontanka16/4134814 to your computer and use it in GitHub Desktop.
right and wrong way to reference an dynamic object with a reserved word as its name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dynamic activities = null; | |
//Wrong | |
var objects = new List<dynamic>(activities.items).Select(a=>a.object); | |
//Right | |
var objects = new List<dynamic>(activities.items).Select(a=>a.@object); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment