August 2005 Entries
/* 1) Base obj = new Derived(); * Untill and unless you've a method overridden * in the derived class, whether or not you say "new method" * in the derived class, the base class's * method would get called. */Salary objBaseDerSalary = new DerivedSalary() ;MessageBox.Show("objBaseDe... " + objBaseDerSalary.myMethod()); /* 2) Derived obj = new Base(); * Gives compilation error, because the parent * cannot be implicitely converted to the derived. * DerivedSalary objBaseDerSalary1 = new...
http://www.from9till2.com/P... by David Ing
http://www.developer.com/de