Write one code example for compile time binding and one for run time binding?what is early/late binding?
Samir Bhogayta
An object is early bound when it is assigned to a variable declared to be of a specific object type . Early bound objects allow the compiler to allocate memory and perform other optimizations before an application executes. â Create a variable to hold a new object. Dim FS As FileStream â Assign a new object to the variable. FS = New FileStream(âC:\tmp.txtâ, FileMode.Open) By contrast, an object is late bound when it is assigned to a variable declared to be of type Object. Objects of this type can hold references to any object, but lack many of the advantages of early-bound objects. Dim xlApp As Object xlApp = CreateObject(âExcel.Applicationâ)