They can also be passed as pointers, if you want to use them. Thought I believe it's considered better to use references over pointers when possible.
void foo(MyClass* obj)
// class passed by reference
MyClass myclass; // create an instance of the class
foo(&myclass); // pass it to another function
MyClass* myclass = new MyClass;//create a pointer to the class and allocate an object at its location
foo(myclass);//call the function
delete myclass;//deallocate the object
Can u plz explain the internals of passing object reference to a function as parameter....that at the compiler level what will happen if i pass object as value and what will happen if i pass objet as reference to a function as parameter
Many of your questions can be answered, as Ancient Dragon suggests, by reading a book. Another appraoch that I find very useful (especially for C++ hidden behavior) is to write a small sample program to test things out. If you write a small class with a copy constructor, assignment operator, constructor, destructor and other methods you might want to evaluate each with a std::cerr print statement in them you will see where each is invoked.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...