Name: Anonymous 2011-08-09 16:36
What is the difference between the objects 'dc' and 'bcdc', in the following bit of code (C#, may apply to other languages as well):
BaseClass bc = new BaseClass();
DerivedClass dc = new DerivedClass();
BaseClass bcdc = new DerivedClass();
Why would you use one over the other? I found it on a page that explained the difference between new and override&virtual
http://msdn.microsoft.com/en-us/library/ms173153%28v=VS.100%29.aspx
BaseClass bc = new BaseClass();
DerivedClass dc = new DerivedClass();
BaseClass bcdc = new DerivedClass();
Why would you use one over the other? I found it on a page that explained the difference between new and override&virtual
http://msdn.microsoft.com/en-us/library/ms173153%28v=VS.100%29.aspx