Home > DeveloperSection > Blogs > Dynamic Binding in C#.

Dynamic Binding in C#.

C# C# 
0 Comment(s)
 2408  View(s)
Rate this:

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();

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

Don't want to miss updates? Please click the below button!

Follow MindStick