I am trying to access a property of a JSON object like
dynamic myJsonData = JObject.Parse("{ \"out\":123, \"xyz\": 456 }");
Console.WriteLine(myJsonData.xyz);
Console.WriteLine(myJsonData.out); here compile time error because out is keyword
So now question is how to remove that error ?
With the use of @ operator can remove error.
dynamic myJsonData = JObject.Parse("{ \"out\":123, \"xyz\": 456 }");
Console.WriteLine(myJsonData.@out);
Output : 123
I hope this solution will help you to remove that kind of error.