example of How to use Json Objects in c#

c# json csharp 5 years, 5 months ago
class Program { static void Main(string[] args) { Object obj = new { Name='Koder', Age=1}; dynamic jsonObj = obj;//Run time Console.writeLine(jsonObj.Name+" "+jsonObj.Age); } }
1125
Instructions

dynamic keyword gives you the flexibility of accessing object as key value pairs...the same json object does.Try to check.Happy Coding

Posted By