VBA (Visual Basic for Applications) Question:
Download Questions PDF

What is Constructors and distructors?

Answer:

when we initialize the form at that time if we want to set any variable's value then we can set it by defining in constructor. constructor 's name always same as class name.and destructor is used to recover memory occupied by any variable defining in constructor.

constructor and destructor is the new way in object oriented languages to initialize the varibles at the time of object creation.
when we declare an object,we can pass the values to it,and that values will be assigned to the data members of that class,whose object it is.
a class can have no. of objects and no. of constructors. an constructor is called automatically when an object is created.
there is only one destructor in any class,that is to deallocated the memory of the object when an object is destroyed or no longer exist

Download VBA Interview Questions And Answers PDF

Previous QuestionNext Question
What is visual basic and its importance?Explain 3 main differences between flexgrid control and dbgrid control?