Munesh  Sharma
What is Dynamic Binding ?
By Munesh Sharma in OOP/OOD on Mar 28 2011
  • kalit sikka
    Jun, 2011 20

    Dynamic binding is a process to bind elements at runtime. It is also known as association of method at runtime not compile time. Dynamic binding in c# defers binding i.e. the process of resolving types, operators and members from compile time to runtime. We can use dynamic binding when we know that certain function, member or operation exists at compile time but the compiler does not know about its existence until that member is called at runtime. This process normally occurs when interrupting with dynamic languages or com or when we use concept of reflection in our program.   

    A dynamic type is declared by using keyword dynamic:

    dynamic obj = CallSomeMethod();
    obj.disp();

    A dynamic type informs the compiler to expects the runtime type of obj to disp() method.

    Visit

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS