Controller Generic Parameter

From Logic Wiki
Jump to: navigation, search


Dynamic Parameters

In C# 4.0, a new type of parameters is introduced that is known as a dynamic parameter. Here the parameters pass dynamically means the compiler does not check the type of the dynamic type variable at compile-time, instead of this, the compiler gets the type at the run time.

 class Program  
    {  
        static void MyDynamicMethod(dynamic dynamicparam)  
        {  
            dynamicparam.DoSomethingDynamic(); // Called dynamically    
        }  
    }