27
1
using System;
2
using System.Dynamic;
3
4
public class Program
5
{
6
public static void Main()
7
{
8
var person = GetPersonInfo();
9
10
Console.WriteLine($"First Name : {person.Name} ");
11
Console.WriteLine($"Age : {person.Age} ");
12
Console.WriteLine($"State : {person.State} ");
13
Console.WriteLine($"Country : {person.Country} ");
14
}
15
16
private static dynamic GetPersonInfo()
17
{
18
dynamic item = new ExpandoObject();
19
item.Name = "Amal";
20
item.Age = 34;
21
item.State = "Kerala";
22
item.Country = "India";
23
24
return item;
25
26
}
27
}
Cached Result
text.com and http://www.google.com