public static void DynamicDemo0() { dynamic d = new DynamicClass(); d.X = 123; d.Y = "123"; //d.Z = 123.456; 未包含Z的定义 Console.WriteLine(d.Return(123)); Console.WriteLine(d.Return("123")); Console.WriteLine(d.Return(123.456)); }