---
title: "What is static and dynamic binding?"  
description: "What is static and dynamic binding?"  
author: "Shikhar Arora"  
published: 2019-12-07  
canonical: https://answers.mindstick.com/qa/92529/what-is-static-and-dynamic-binding  
category: "technology"  
tags: ["software engineering", "programming language"]  
reading_time: 2 minutes  

---

# What is static and dynamic binding?

What is [static](https://www.mindstick.com/blog/153/static-class-in-c-sharp) and [dynamic binding](https://www.mindstick.com/interview/2391/what-is-the-difference-between-static-binding-and-dynamic-binding-in-java)

## Answers

### Answer by Rahul Roi

Whenever an object is assigned to an object variable of the specific type, then the C# compiler performs the [binding](https://www.mindstick.com/blog/232/binding-data-in-listbox-and-get-selected-value-from-listbox-using-java-script) with the help of .NET Framework. C# performs two different types of bindings which are:

- Early Binding or Static Binding
- Late Binding or [Dynamic](https://www.mindstick.com/blog/146/dynamic-binding-in-c-sharp) Binding

Early Binding or Static Binding

These are recognizes and checks the methods, or properties during compile time. According to this binding, the compiler already knows about what kind of object it is and what are the methods or properties it holds, here the objects are static objects. The excecution of early binding is fast and it is easy to code. It decreases the number of run-time errors.

![What is static and dynamic binding?](https://answers.mindstick.com/questionanswer/96ac73e1-e828-46f7-bf7d-0e6ca0414a2d/images/bf04f4b7-391c-44fe-93f1-821aa8814546.jpeg)\

Late Binding or Dynamic Binding

About the LateBinding, the compiler does not know about what kind of object it is and what are the methods or properties it holds, here the objects are dynamic objects. When the type of the objects are decided on the basis of the data that holds on the right-hand side during run-time. Mostly, the late binding is achieved by using virtual methods. The excecution of late binding is slower than early binding because it requires lookups at run-time.

![What is static and dynamic binding?](https://answers.mindstick.com/questionanswer/96ac73e1-e828-46f7-bf7d-0e6ca0414a2d/images/b5abcdb9-e659-4085-a878-c22bf74868bc.jpeg)\

Please Read :- [What is virtual function?](https://answers.mindstick.com/qa/92533/what-is-virtual-function)


---

Original Source: https://answers.mindstick.com/qa/92529/what-is-static-and-dynamic-binding

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
