Prizes & Awards
My Profile
Active Members
TodayLast 7 Days
more...
|
New Feature: Community Sites:
Create your own .NET community website and start earning from Google AdSense !
It's Free !
|
Early and Late Binding
Posted Date: 30 May 2008 Resource Type: Definitions Category: General
|
Posted By: rudra Member Level: Silver Rating: Points: 5
|
Early and Late Binding Binding is something we do when diminishing a variable, though many developers may not realize the importance of how they bind a class. Early binding, often referred to as strong typing, refers to explicitly declaring the class used to define a variable. Early binding has several benefits. For example, when programming, Visual Studio .NET can give access to the class's interface with Intellisense which greatly reduces potential for typos and promotes rapid development. Also, when early binding a class, the Visual Basic compiler can enforce the proper use of a class's interface by providing warnings and refusing to complete the compile until the error is resolved. But performance gains are probably the most important reason to bind early: Early binding allows your program to access your class's interface directly, rather than through the Windows Registry or at runtime. If the compiler knows ahead of time which classes you will be using in your application, it can make the appropriate compilation optimizations.
Late binding can be useful when developing against non-existent components or ones that are being developed. Late binding allows you to continue compiling your code until the component is available; once the class is available, you can modify your code to early bind. You might also use late binding when you truly don't know the object type that will be passed to your function, in which case it is perfectly acceptable to accept any type of object. Before late binding can occur, the Option Strict option must be set to off. Option strict is off by default: Option Strict Off
|
Responses
|
No responses found. Be the first to respond and make money from revenue sharing program.
|
|