利用dynamic动态创建对象
dynamic MyDynamic = new System.Dynamic.ExpandoObject(); MyDynamic.A = "A"; MyDynamic.B = "B"; MyDynamic.C = "C"; MyDynamic.Number = 12; MyDynamic.MyMethod = new Func<int>(() => { return 55; }); Console.WriteLine(MyDynamic.MyMethod()); Console.WriteLine(MyDynamic.A);
把圈子变小,把语言变干净,把成绩往上提,把故事往心里收,现在想要的以后你都会有。