example of How to use Json Objects in c#

c# json csharp 4 years, 8 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); } }
934
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