private static void Main(string[] args) { //UseObjectVariable(); //PrintThreeStrings(); //ChangeDynamicDataType(); //InvokeMembersOnDynamicData(); VeryDynamicClass c = new VeryDynamicClass(); c.DynamicMethod("1"); Console.ReadLine(); }
static void Main() { WriteLine("***** Fun with the dynamic keyword *****"); ImplicitlyTypedVariable(); UseObjectVariable(); PrintThreeStrings(); ChangeDynamicDataType(); InvokeMembersOnDynamicData(); VeryDynamicClass d = new VeryDynamicClass(); WriteLine($"Dynamic method returned {d.DynamicMethod("foobar")}"); ReadLine(); }
static void DynamicClass() { VeryDynamicClass dyClass = new VeryDynamicClass(); Console.WriteLine(dyClass.DynamicMethod(10)); }