Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is meant by "Early Binding" and "Late Binding"? Which
is better?



What is meant by "Early Binding" and "Late Binding"? Which is better?..

Answer / guest

Early binding and late binding refer to the method used to
bind an interface's properties and methods to an object
reference (variable). Early binding uses type library
information at design time to reference procedures, while
late binding handles this at run time. Late binding
handles this by interrogating the reference before each
call to insure that it supports a particular method. Since
every call to a late bound object actually requires two
calls ("Do you do this?" followed by "Okay, do it then"),
late binding is much less efficient than early binding.
Except where early binding is not supported (ASP,
scripting, etc.), late binding should only be used in very
special cases.

It is a common misconception that any code using the
CreateObject function instead of Set = New is using late
binding. This is not the case. The type declaration of
the object variable determines whether it is late or early
bound, as in the following:

Dim A As Foo
Dim B As Foo
Dim C As Object
Dim D As Object

Set A = New Foo 'Early Bound
Set B = CreateObject("FooLib.Foo") 'Early Bound
Set C = CreateObject("FooLib.Foo") 'Late Bound
Set D = New Foo 'Late Bound

Is This Answer Correct ?    6 Yes 3 No

Post New Answer

More Visual Basic Interview Questions

How come I get a "No Current Record" error when I use a a Data Control on an empty table?

0 Answers  


What is the difference between creating a object using New and CreateObject in Visual Basic?

1 Answers  


How do I prevent multiple instances of my program?

0 Answers  


which property is used to change to some value to access a identity column in datacontrols?

0 Answers  


what is the difference between Listindex and Tab index.

1 Answers  


Explain about conditional operators?

0 Answers  


How would you create properties in ActiveX Control?

0 Answers  


which VB constant make the menu item in centre?

1 Answers  


reading lines from a file by searching a word(instr) and copying to other textfile,but its only copying only one line but there are some other lines match criteria but not copying to the files

2 Answers  


what are the types of combo box?

1 Answers   Satyam,


How do I dial a phone number without using the MSCOMM VBX?

0 Answers  


What is difference between datagrid and flexgrid?

3 Answers   InfoWorld, TCS,


Categories