---
title: "Dynamic Binding in C#."  
description: "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"  
author: "Anonymous User"  
published: 2011-04-28  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/146/dynamic-binding-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Dynamic Binding in C#.

[Dynamic binding](https://www.mindstick.com/interview/2391/what-is-the-difference-between-static-binding-and-dynamic-binding-in-java) is a process to bind elements at runtime. It is also [known as](https://answers.mindstick.com/qa/35703/ricky-ponting-is-also-known-as-what) association of method at runtime not compile time. Dynamic [binding in c#](https://www.mindstick.com/forum/33930/difference-between-early-binding-and-late-binding-in-c-sharp) defers binding i.e. the process of resolving types, [operators](https://www.mindstick.com/articles/716/php-operators) and members from compile time to runtime. We can use dynamic binding when we know that certain [function](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server), member or [operation](https://www.mindstick.com/forum/33917/how-to-callback-operation-using-delegate-in-c-sharp) exists at compile time but the [compiler](https://www.mindstick.com/articles/27/just-in-time-compiler) does not know about its existence until that member is called at runtime. This process normally occurs when interrupting with dynamic [languages](https://yourviews.mindstick.com/story/1463/some-oldest-languages-in-the-world-still-spoken) or com or when we use [concept of reflection](https://www.mindstick.com/forum/158580/discuss-the-concept-of-reflection-in-the-dot-net-framework-and-its-practical-applications) 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.

---

Original Source: https://www.mindstick.com/blog/146/dynamic-binding-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
