I think we could do the same without even using the interfaces: Create class A with methods MA, class B with method MB. Create class AB and create new instances of class A and class B inside the AB.
These C# tutorials are phenominal...I love the way the material is explained in suce a simplified way making it much much much easier to understand..and retain...these videos are simply awesome!!!
Venkat, thank you for all the excellent videos. Hi I am learning C#...Class AB inherits from interfaces IA and IB whose methods < Amthod() & BMethod() > are not implemented as per rules of Interfaces. When this is the situation.. i am assuming that, objects created(a,b) in class AB are calling methods < Amthod() & BMethod() > from interfaces only not from classes. this is my understanding. my Question:.. when this is the situation.. how can it print A and B from classes method Definitions. Thank you in advance. Please explain it in more detail way that will help me to proceed further in learning c#
I think we could do the same without even using the interfaces: Create class A with methods MA, class B with method MB. Create class AB and create new instances of class A and class B inside the AB.
ReplyDeletethat's correct...
DeleteThese C# tutorials are phenominal...I love the way the material is explained in suce a simplified way making it much much much easier to understand..and retain...these videos are simply awesome!!!
ReplyDeleteVenkat, thank you for all the excellent videos. Hi I am learning C#...Class AB inherits from interfaces IA and IB whose methods < Amthod() & BMethod() > are not implemented as per rules of Interfaces. When this is the situation.. i am assuming that, objects created(a,b) in class AB are calling methods < Amthod() & BMethod() > from interfaces only not from classes. this is my understanding.
ReplyDeletemy Question:.. when this is the situation.. how can it print A and B from classes method Definitions.
Thank you in advance. Please explain it in more detail way that will help me to proceed further in learning c#
i have a question in my mind that what is the purpose(sole purpose) of interface in c# is it for multiple inheritance?
ReplyDeleteNo there is a concept called dependency injection which is used to avoid tightly coupled code in which interfaces play a big role
Delete