المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Inheritance/Polymorphism [modified]



C# Programming
02-06-2010, 03:40 PM
Hello all, my name is Sundeepan and I am new to this board and to coding as well. To train myself and get familiar with OOP concepts using the C# ******** I am reading, "Microsoft .NET Framework - Application Development Foundation" book by Tony Northrup. I am finding this book very informative. I do have a question that I was not able to find an answer to by querying Google. The question is as follows:

If a method requires an object as one of its parameters why should one not pass an object of a base class, instead one must pass an object of the derived class?

I understand that this might be a foolish question, but I am at a very early stage of my learning, any help would be appreciated. Metaphors are equally as helpful as a technical answer.

Regards

Sundeepan

http://sundeepinthought.blogspot.com

modified on Friday, February 5, 2010 12:32 AM