dynamic para1 = 10;
Console.WriteLine(para1);//输出:10para1 = "张三丰";
Console.WriteLine(para1);//输出:张三丰
para1 = new { age = 20, name = "Jack" };
Console.WriteLine(para1);//输出:{ age = 10, name = Jack }
Console.WriteLine(para1.age);//输出:20
para1 = new Dictionary<int, string>();para1.Add(1, "张三丰");
foreach (var item in para1)
{ Console.WriteLine(item.Key + "-->" + item.Value);//输出:1-->张三丰}
---------------------
作者:天马3798
来源:CSDN
原文:https://blog.csdn.net/u011127019/article/details/76092382
版权声明:本文为博主原创文章,转载请附上博文链接!