Early Binding

What Does Early Binding Mean?

In C#, early binding is a process in which a variable is assigned to a specific type of object during its declaration to create an early-bound object. This contrasts the late-bound object process, where an object type is revealed at the time of instantiation.


Early binding is implemented in a number of C# concepts, such as overloaded methods, overloaded operators and overridden methods, which are directly called via the use of derived objects. Early binding is not flexible and can result in version compatibility issues, due to the high dependency of property and method types and parameters.

Early binding is also known as compile time polymorphism, static binding and static typing.

Techopedia Explains Early Binding

Early binding benefits include:

  • The compiler can perform optimization, which results in more efficient applications
  • Early-bound objects are faster, have better code readability and are easily maintained.
  • Using Visual Studio’s integrated development environment (IDE) as a development tool, early binding aids in rapid application development (RAD) by providing quick access to object properties and methods – reducing typographical errors.
  • Errors are revealed during compilation, which reduces runtime error severity and frequency.

During early binding, the C# compiler performs syntax and type checks to ensure that the correct parameter amount and type are passed to the method or property. Early binding also checks for the return value, which minimizes execution time and runtime errors.

For example, a C# automation client application needs to calculate a value with a defined Microsoft Excel formula. The application may create an object of type Microsoft Excel and call its required method after initializing the object properties. Because Microsoft Excel is a specific type of object, the created and assigned variable is an early-bound object.

While working with early-bound objects, it is necessary to include the type library where the definitions of early-bound object types are defined. Additionally, an early-bound object cannot be used to assign an object of another type after its declaration.


Related Terms

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…