C# 4.0 supports dynamic programming by introducing new dynamic typed objects. The type of these objects is resolved at run-time instead of at compile-time. The keyword tells the compiler that everything to do with the object, declared as dynamic, should be done dynamically at the run-time using Dynamic Language Runtime(DLR)
dynamic num = Getnum();
dynamic str = GetString();
Console.WriteLine("Your number is " + num);
Console.WriteLine("Your string is " + str);
private static string
private static int Getnum()
C# Corner. All contents are copyright of their authors.